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

Re: RefTree: Alternate ref backend

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 22, 2015, 21:23 UTC
Message-ID
<xmqqoadich4x.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<6263203.WlZuyGWxlh@mfick1-lnx>
Martin Fick <mfick@codeaurora.org> writes:
Show 8 quoted lines
> ...  What if we added
> a leading slash for absolute references? Then I could do
> something like:
>
> /HEAD
> /refs/heads/master
> /refs/tags/v1.0.0
> /refs/remotes/origin/master

Yeah, that is one way to allow a tool to be absolutely certain there is no funny DWIMmery going on.

> This is a long term idea, but it might make sense to
> consider it now just for the sake of storing refs, it would
> eliminate the need for the ".." notation for "refs/..HEAD".

I do not see how the absolute notation has anything to do with eliminating "the need for the '..' notation" at all, though.

The funny "..HEAD" was brought up only because Shawn wanted to omit a single level of dereferencing of a tree object, so that the top-level tree for his ref backend would have "heads/", "tags/", etc. in it, and because "HEAD" is not next to "heads/" and "tags/", it needed some funny notation to avoid squatting on "HEAD" that should mean "refs/HEAD" in the notation.

> Now if we could only figure out a way to tell plumbing that
> something is a SHA, not a ref? :)

You do not need :) there; I think we discussed something along that line in the past few weeks (see the list archive).

Previous: Martin Fick
Message 18 of 18 in “RefTree: Alternate ref backend”
  1. Shawn PearceDec 17, 2015
  2. Junio C HamanoDec 17, 2015
  3. Shawn PearceDec 17, 2015
  4. Jeff KingDec 17, 2015
  5. Shawn PearceDec 17, 2015
  6. Mike HommeyDec 18, 2015
  7. Michael HaggertyDec 22, 2015
  8. Shawn PearceDec 22, 2015
  9. Dave BorowitzDec 22, 2015
  10. Michael HaggertyDec 22, 2015
  11. Shawn PearceDec 22, 2015
  12. Junio C HamanoDec 22, 2015
  13. Shawn PearceDec 22, 2015
  14. Junio C HamanoDec 22, 2015
  15. Michael HaggertyDec 23, 2015
  16. Junio C HamanoDec 24, 2015
  17. Martin FickDec 22, 2015
  18. Junio C HamanoDec 22, 2015

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.