git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Feature request: separate namespace for remote tags
@ 2010-02-22 12:44 Avi Kivity
  2010-02-22 18:22 ` Avery Pennarun
  0 siblings, 1 reply; 3+ messages in thread
From: Avi Kivity @ 2010-02-22 12:44 UTC (permalink / raw)
  To: git

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

A workaround is to use tagopt = --no-tags and a separate fetch line in 
the remote configuration, but that is clumsy and error prone (a common 
error being to remember doing that only after the first fetch).  I'd 
like to request that remote tags be placed into a separate namespace 
(refs/remote-tags/foo/*?) that can be managed by 'git remote' subcommands.

My suggestion is:

- 'git clone' and subsequent fetches would continue to place tags in the 
global namespace (unless overridden by a switch)
- 'git remote add', if a switch of config flag is present, will place 
tags in a remote namespace; after a while the config flag can default to 
true
- 'git describe' will prefer local tags to remote tags
- the various commands which look at tags will be enhanced to consider 
remote tag namespaces
- possibly ignore remote tags which have the same name and value as 
existing local tags (so we don't have identical v1.7.0 and foo/v1.7.0)

Thoughts?

-- 
error compiling committee.c: too many arguments to function

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Feature request: separate namespace for remote tags
  2010-02-22 12:44 Feature request: separate namespace for remote tags Avi Kivity
@ 2010-02-22 18:22 ` Avery Pennarun
  2010-02-22 18:35   ` Avi Kivity
  0 siblings, 1 reply; 3+ messages in thread
From: Avery Pennarun @ 2010-02-22 18:22 UTC (permalink / raw)
  To: Avi Kivity; +Cc: git

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.

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.

Have fun,

Avery

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Feature request: separate namespace for remote tags
  2010-02-22 18:22 ` Avery Pennarun
@ 2010-02-22 18:35   ` Avi Kivity
  0 siblings, 0 replies; 3+ messages in thread
From: Avi Kivity @ 2010-02-22 18:35 UTC (permalink / raw)
  To: Avery Pennarun; +Cc: git

On 02/22/2010 08:22 PM, Avery Pennarun wrote:
> 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.

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-02-22 18:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-22 12:44 Feature request: separate namespace for remote tags Avi Kivity
2010-02-22 18:22 ` Avery Pennarun
2010-02-22 18:35   ` Avi Kivity

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