git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[RFC] Hidden refs

From
Marc Branchaud <marcnarc@xiplink.com>
Date
Oct 13, 2010, 15:22 UTC
Message-ID
<4CB5CEA3.8020702@xiplink.com>
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.
Next: Stephen Bash
Message 1 of 8 in “[RFC] Hidden refs”
  1. Marc BranchaudOct 13, 2010
  2. Stephen BashOct 13, 2010
  3. Marc BranchaudOct 13, 2010
  4. Jeff KingOct 13, 2010
  5. Junio C HamanoOct 13, 2010
  6. Jeff KingOct 13, 2010
  7. Junio C HamanoOct 13, 2010
  8. Jonathan NiederOct 13, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.