git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: Marc Branchaud <marcnarc@xiplink.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: [RFC] Hidden refs
Date: Wed, 13 Oct 2010 13:35:55 -0400	[thread overview]
Message-ID: <20101013173555.GA13188@sigill.intra.peff.net> (raw)
In-Reply-To: <4CB5CEA3.8020702@xiplink.com>

On Wed, Oct 13, 2010 at 11:22:11AM -0400, Marc Branchaud wrote:

> We want to have our build system record, in our repo, which commits
> correspond to which builds.
> 
> Nominally, this is a job for tags.  But we don't want to have to look at
> these tags all the time.  We particularly just want to tag the repo when we
> make an actual release -- tags are a Big Deal for us.
> 
> Notes are an option, though they feel a bit heavy for this application.  And
> although we can store the build notes in their own refspace, it would (I
> believe) be a little clunky to make commands like checkout and log work with
> the commits that were noted by the build system.

Keep in mind that notes and tags are basically inverses as far as
efficient lookup goes. If you want to map a build name or number to a
commit, you would use a ref which points to a commit. But if you want to
map a commit sha1 to a build number, you would use notes.

> It struck me that it would be neat to have hidden refs in the refs/
> directory.  I experimented a bit with a "refs/.builds" directory:
> 
> * "git update-ref refs/.builds/One" fails with "Cannot lock the
>   ref 'refs/.builds/One'."  So I created a ref the regular way
>   (refs/blah/One) and copied the "One" file into refs/.builds/.

Yeah, I believe "." at the front of a directory component is explicitly
forbidden by check_ref_format. I don't recall whether there was a
specific rationale, or whether it was simply a can of worms we didn't
want to explore.

...

Look like it blames to 03feddd (git-check-ref-format: reject funny ref
names., 2005-10-13).  This looks like the relevant thread:

  http://article.gmane.org/gmane.comp.version-control.git/9874

but I didn't read through it carefully.

-Peff

  parent reply	other threads:[~2010-10-13 17:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-13 15:22 [RFC] Hidden refs Marc Branchaud
2010-10-13 15:32 ` Stephen Bash
2010-10-13 16:14   ` Marc Branchaud
2010-10-13 17:35 ` Jeff King [this message]
2010-10-13 17:42   ` Junio C Hamano
2010-10-13 17:46     ` Jeff King
2010-10-13 17:51       ` Junio C Hamano
2010-10-13 17:53         ` Jonathan Nieder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101013173555.GA13188@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=marcnarc@xiplink.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).