From: Jeff King <peff@peff.net>
To: Martin Nicolay <m.nicolay@osm-ag.de>
Cc: git@vger.kernel.org
Subject: Re: missing tags from "git fetch"
Date: Wed, 2 Oct 2019 09:55:19 -0400 [thread overview]
Message-ID: <20191002135518.GA3599@sigill.intra.peff.net> (raw)
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:
> 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
next prev parent reply other threads:[~2019-10-02 13:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-02 13:10 missing tags from "git fetch" Martin Nicolay
2019-10-02 13:55 ` Jeff King [this message]
2019-10-02 15:24 ` Martin Nicolay
2019-10-25 10:17 ` Martin Nicolay
2019-11-22 13:00 ` Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191002135518.GA3599@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=m.nicolay@osm-ag.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).