From: Junio C Hamano <gitster@pobox.com>
To: Kevin Daudt <me@ikke.info>
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 13:38:36 -0700 [thread overview]
Message-ID: <xmqqk222expv.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <20170817202257.GC3839@alpha.vpn.ikke.info> (Kevin Daudt's message of "Thu, 17 Aug 2017 22:22:57 +0200")
Kevin Daudt <me@ikke.info> writes:
> 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.
No, you are not misunderstanding anything. The "pretend that we
immediately turned around and fetched" done by "git push" was
already breaking the predictability, but the change in 1.8.4 made it
even worse. I am saying that going back to the old behaviour may be
one option to address the issue being discussed in this thread.
next prev parent reply other threads:[~2017-08-17 20:38 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
2017-08-17 20:38 ` Junio C Hamano [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqk222expv.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox.com \
--cc=Magnus.Carlsson@arris.com \
--cc=git@vger.kernel.org \
--cc=me@ikke.info \
--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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.