Re: [PATCH] Clarify that '--tags' fetches tags only
- From
Jakub Narebski <jnareb@gmail.com>
- Date
- Sep 30, 2011, 08:44 UTC
- Message-ID
- <m3pqiio1xc.fsf@localhost.localdomain>
- In-Reply-To
- <loom.20110930T041939-332@post.gmane.org>
Peter Shenkin <shenkin@gmail.com> writes:
[...]
Show 7 quoted lines
> Now I have a related question. I always want to retrieve all > tags from tracking branches when I do a "git pull". Right now, > if I want to do this, it seem (unless I am missing something) > that I have to do "git fetch --tags; git fetch; git merge". Is > there a way I can put something into my .git/config file so > that I get this effect simply by doing a "git pull"? That's > what I was trying to do when I added "tagopt = --tags".
Actually fetching of branches on remote into remote-tracking branches would also fetch all tags that point to commits on fetched branches (so called "autofollow" feature).
If you want to fetch _all_ tags, you need to configure fetched branches (e.g. via glob refspec). I think that then "tagopt = --tags" works as expected then, as it is in addition to refspec not as the only refspec; "fetch = +refs/tags/*:refs/tags/*" should work as well.
HTH
-- Jakub Narębski