Re: Local tag killer
On Tue, 24 Sep 2013, Jeff King wrote:
Show 31 quoted lines
> On Sat, Sep 21, 2013 at 08:42:26AM +0200, Michael Haggerty wrote:
>
> > I think it would be preferable if "--prune" would *not* affect tags, and
> > if there were an extra option like "--prune-tags" that would have to be
> > used explicitly to cause tags to be pruned. Would somebody object to
> > such a change?
>
> I think most of this problem is the way that we fetch tags straight into
> the refs/tags hierarchy. You would not do:
>
> [remote "origin"]
> fetch = +refs/heads/*:refs/heads/*
> prune = true
>
> unless you wanted to be a pure-mirror, because you would hose your local
> changes any time you fetched. But that is _exactly_ what we do with a
> refs/tags/*:refs/tags/* fetch.
>
> If we instead moved to a default fetch refspec more like:
>
> [remote "origin"]
> fetch = +refs/*:refs/remotes/origin/refs/*
>
> Then everything would Just Work. If you prune what the other side has
> locally, that's fine. All you're doing is pruning your view of what he
> has, not anything you've done locally.
>
> The tricky part is tweaking the lookup rules so that "origin/master"
> still works, and that looking for "v1.0" checks both refs/tags and
> refs/remotes/*/refs/tags. And of course managing backwards
> compatibility. :)
Cheers !!!
I remember participating to a discussion about this like 2.5 years ago:
http://news.gmane.org/group/gmane.comp.version-control.git/thread=165799
The flat tag namespace remains my major annoyance with git IMHO.
Nicolas