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

Re: enhanced remote ref namespaces

From
Jacob Keller <jacob.keller@gmail.com>
Date
Aug 12, 2015, 19:02 UTC
Message-ID
<CA+P7+xq_v+TjqSDC3aR2bdUmCJyj=zLXSE5SbVgOEr+SojOUQQ@mail.gmail.com>
In-Reply-To
<xmqqegj8l4lw.fsf@gitster.dls.corp.google.com>
On Wed, Aug 12, 2015 at 11:54 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 33 quoted lines
> Jacob Keller <jacob.keller@gmail.com> writes:
>
>>> Just thinking aloud, perhaps we can introduce a brand new top level
>>> hierarchy refs/remote/$O/{heads,tags,notes,...}, and give backward
>>> compatibility by making a moral equivalent of a symbolic link from
>>> refs/remote/$O/heads to refs/remotes/$O/.  The true remote-tracknig
>>> refs continue to live in refs/remotes/$O/* and old tools that do not
>>> know the new layout would not be hurt.  New tools that want to
>>> ignore and look only at refs/remote/$O/* can do so through the moral
>>> equivalent of a symbolic link.  "remote remove" needs to be taught
>>> about this single exception (i.e. "the symbolic link"), but the
>>> places it needs to touch is limited only to two places and will not
>>> grow.
>>
>> I think this proposal makes the sense..  I'd go with something like:
>>
>> refs/tracking/<origin>/(heads|tags|notes|replace|etc)/*
>>
>> with a symlink from or into
>>
>> refs/tracking/<origin>/heads -> refs/remotes/<origin>
>
> I actually do not think we even need the "symlink" thing.
>
> We can just say refs/remotes/$O has been and forever will be where
> the remote-tracking branches will live.  With or without the symlink
> for backward compatibility, the updated Git will need to be aware of
> the two places to deal with older and newer repositories anyway.
>
> "everything is now under refs/tracking/$O, not spread over many
> unbounded number of places like refs/remotes-$foo/$O" may appear to
> be cleaner but two is already not too bad and will greatly reduce
> the transition pain.

Ok, so.... just have branches be in refs/remotes/$O and all new things be in refs/tracking/$O/category

that sounds reasonable enough to me.

That still hasn't really resolved the question of how to deal with tags, but it does solve the question of how to deal with replace and notes refs.

Regards, Jake

Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 5 in “Re: enhanced remote ref namespaces”
  1. Jacob KellerAug 12, 2015
  2. Junio C HamanoAug 12, 2015
  3. Jacob KellerAug 12, 2015
  4. Junio C HamanoAug 12, 2015
  5. Johan HerlandAug 12, 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.