git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Branchaud <marcnarc@xiplink.com>
To: Git Mailing List <git@vger.kernel.org>
Subject: [RFC] Hidden refs
Date: Wed, 13 Oct 2010 11:22:11 -0400	[thread overview]
Message-ID: <4CB5CEA3.8020702@xiplink.com> (raw)

Hi all,

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.

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/.

* Commands like show, checkout, and log all worked fine with
  "refs/.builds/One"

* "git show-ref" ignores the entries in refs/.builds/.

* So the .builds/ refs don't show up in gitk -- yay!

* "git push origin +refs/.builds/One fails with "remote part of refspec is
not a valid name in +refs/.builds/One".

* Completion in bash doesn't work with entries in refs/.builds/.

So I'm wondering if it makes sense to properly support hidden directories in
refs/, and what it would take to do so.  (I image, for example, that things
would behave quite differently on Windows...)

Thoughts?

		M.

             reply	other threads:[~2010-10-13 15:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-13 15:22 Marc Branchaud [this message]
2010-10-13 15:32 ` [RFC] Hidden refs Stephen Bash
2010-10-13 16:14   ` Marc Branchaud
2010-10-13 17:35 ` Jeff King
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

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

  git send-email \
    --in-reply-to=4CB5CEA3.8020702@xiplink.com \
    --to=marcnarc@xiplink.com \
    --cc=git@vger.kernel.org \
    /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.
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 NNTP newsgroup(s).