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

Re: Feature request: separate namespace for remote tags

From
AKAvi Kivity <avi@redhat.com>
Date
Feb 22, 2010, 18:35 UTC
Message-ID
<4B82CE58.8060902@redhat.com>
In-Reply-To
<32541b131002221022h57c6bf05mdeb8d27cdbbd1f54@mail.gmail.com>
On 02/22/2010 08:22 PM, Avery Pennarun wrote:
Show 22 quoted lines
> On Mon, Feb 22, 2010 at 7:44 AM, Avi Kivity<avi@redhat.com>  wrote:
>    
>> Currently, 'git remote add foo ...' will allocate a separate namespace for
>> foo branches (refs/remotes/foo/*) but will store foo tags in the main tag
>> namespace (refs/tags/*).  This leads to several problems:
>>
>> - the main tag namespace becomes polluted with zillions of tags
>> - if the tags from a remote conflict with a local (or perhaps another
>> remote) tag, information is lost
>> - 'git remote rm' will not delete the remote tags, and so 'git gc' will not
>> recover much of the space used by the remote
>>      
> I've sometimes wished for such a feature myself.  When merging things
> using git-subtree, for example, you can easily end up importing
> "v1.2.3" type tags from two different projects and causing yourself
> total confusion.
>
> However, just dividing the tags into namespaces removes one of the
> nicest features of tags, which is that they uniquely identify a
> particular revision across all repositories.  The whole point is that
> ap/v1.2.3 isn't ever supposed to differ from origin/v1.2.3.
>    

That's why I suggested not creating ap/v1.2.3 if it matches refs/tags/v1.2.3 (a clone would default to using regs/tags, not refs/remote-tags/origin). If they don't match, at least you don't lost information.

Show 5 quoted lines
> One option would be to split the tags into namespaces, but then
> automatically search all namespaces when looking for a particular tag.
>   Then when you drop a particular remote, you'd lose all its tags, but
> if you *don't* drop that remote, things look like they always have.
>    
Yes.
-- 
Do not meddle in the internals of kernels, for they are subtle and quick to panic.
Previous: Avery Pennarun
Message 3 of 3 in “Feature request: separate namespace for remote tags”
  1. Avi KivityFeb 22, 2010
  2. Avery PennarunFeb 22, 2010
  3. Avi KivityFeb 22, 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.