From: Kevin Daudt <me@ikke.info>
To: Junio C Hamano <gitster@pobox.com>
Cc: Jeff King <peff@peff.net>,
"Carlsson, Magnus" <Magnus.Carlsson@arris.com>,
"git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: git fetch with refspec does not include tags?
Date: Thu, 17 Aug 2017 22:22:57 +0200 [thread overview]
Message-ID: <20170817202257.GC3839@alpha.vpn.ikke.info> (raw)
In-Reply-To: <xmqq1soagf1p.fsf@gitster.mtv.corp.google.com>
On Thu, Aug 17, 2017 at 12:38:58PM -0700, Junio C Hamano wrote:
> Jeff King <peff@peff.net> writes:
>
> > # no tags, we just populate FETCH_HEAD because of the bare URL
> > git fetch ../parent
> >
> > # this does fetch tags, because we're storing the result according to
> > # the configured refspec ("refs/heads/*:refs/remotes/origin/*").
> > git fetch origin
>
> The above two look good.
>
> > # this doesn't fetch tags, as the main command is "just" populating
> > # FETCH_HEAD. But then our logic for "hey, we fetched the ref for
> > # refs/remotes/origin/master, so let's update it on the side" kicks
> > # in. And we end up updating FETCH_HEAD _and_ the tracking branch, but
> > # not the tags. Weird.
> > git fetch origin master
>
> Yes, it looks weird, but I suspect that it is probably more correct
> not to fetch tags in this case. I wonder if it would be a solution
> not to do the "on the side" thing---after all the user didn't tell
> us to update refs/remotes/origin/master with this command line.
Isn't that how git fetch used to behave, or am I misunderstanding what
you mean? It used to be that git fetch <remote> <branch> would not
update any remote tracking branches.
From the 1.8.4 release notes:
> "git fetch origin master" unlike "git fetch origin" or "git fetch"
> did not update "refs/remotes/origin/master"; this was an early
> design decision to keep the update of remote tracking branches
> predictable, but in practice it turns out that people find it more
> convenient to opportunistically update them whenever we have a
> chance, and we have been updating them when we run "git push" which
> already breaks the original "predictability" anyway.
next prev parent reply other threads:[~2017-08-17 20:23 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1502960406180.9006@arris.com>
2017-08-17 9:02 ` git fetch with refspec does not include tags? Carlsson, Magnus
2017-08-17 9:28 ` Jeff King
2017-08-17 11:29 ` Carlsson, Magnus
2017-08-17 14:22 ` Jeff King
2017-08-17 19:41 ` Junio C Hamano
2017-08-17 19:38 ` Junio C Hamano
2017-08-17 20:22 ` Kevin Daudt [this message]
2017-08-17 20:38 ` Junio C Hamano
2017-08-17 20:43 ` Kevin Daudt
2017-08-20 7:47 ` Jeff King
2017-08-20 7:50 ` Jeff King
2017-08-20 15:51 ` Junio C Hamano
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170817202257.GC3839@alpha.vpn.ikke.info \
--to=me@ikke.info \
--cc=Magnus.Carlsson@arris.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).