Re: missing tags from "git fetch"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Oct 02, 2019 at 03:10:12PM +0200, Martin Nicolay wrote:

> 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@xxxxxxxxxxxxxxxxxxxxx/

-Peff



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux