Re: missing tags from "git fetch"
- From
Jeff King <peff@peff.net>
- Date
- Oct 2, 2019, 13:55 UTC
- Message-ID
- <20191002135518.GA3599@sigill.intra.peff.net>
- In-Reply-To
- <alpine.LSU.2.20.1910021431130.32588@cpza.bfz-tzou.qr>
On Wed, Oct 02, 2019 at 03:10:12PM +0200, Martin Nicolay wrote:
Show 11 quoted lines
> I don't know if this is a lack of understanding or a software or > documentation bug. > > man git-fetch says about tags: > By default, any tag that points into the histories being fetched is > also fetched; the effect is to fetch tags that point at branches that > you are interested in. > > If I fetch without --tags the tags that point to the commits of the fetched > branch are not fetched. If I fetch with --tags than all tags are fetched but > I only wish to fetch tags pointing to something in the branch fetched.
It's a documentation bug, I think. We won't auto-follow tags when fetching into FETCH_HEAD (but this is further confused by the fact that fetching into FETCH_HEAD will auto-update a tracking ref).
So instead of this:
> $ git fetch origin master
try this:
$ git fetch origin
or even this:
$ git fetch origin master:refs/remotes/origin/master
There's more discussion in this thread (but it looks like no patches ever came out of it):
https://public-inbox.org/git/20170817092853.hteuzni5lxia4ejf@sigill.intra.peff.net/
-Peff