From: Brandon Williams <bmwill@google.com>
To: Jonathan Tan <jonathantanmy@google.com>
Cc: sbeller@google.com, git@vger.kernel.org
Subject: Re: [PATCH v2 2/2] fetch: send "refs/tags/" prefix upon CLI refspecs
Date: Mon, 18 Jun 2018 12:53:36 -0700 [thread overview]
Message-ID: <20180618195336.GE73085@google.com> (raw)
In-Reply-To: <20180618194750.137341-1-jonathantanmy@google.com>
On 06/18, Jonathan Tan wrote:
>
> This would cause different behavior. For example, if I run "git fetch
> refs/heads/master refs/tags/foo", I would expect tag following to work
> even if the tag's name does not start with refs/tags/foo.
I understand that some people *may* want tag following, but really its
confusing from an end user's standpoint. You can fetch a particular ref
and end up with a bunch of tags that you didn't want. Aside from that
my biggest issue is with performance. The ref filtering was added to
cut down on the number of refs sent from the server, now we're basically
adding them all back no matter what (unless a user goes and flips the
default to not fetch tags).
I think we're probably going to need some people other than us to
comment on how this should be handled.
>
> > > @@ -359,7 +359,7 @@ static struct ref *get_ref_map(struct transport *transport,
> > > refspec_ref_prefixes(&transport->remote->fetch, &ref_prefixes);
> > >
> > > if (ref_prefixes.argc &&
> > > - (tags == TAGS_SET || (tags == TAGS_DEFAULT && !rs->nr))) {
> > > + (tags == TAGS_SET || tags == TAGS_DEFAULT)) {
> >
> > Oh, I see. This always asks for refs/tags/ whereas before we only
> > asked for them if there were *no* refspec given. Maybe we can
> > change this to
> >
> > refspec_any_item_contains("refs/tags/")
> >
> > instead of always asking for the tags?
> > (that function would need to be written; I guess for a short term bugfix
> > this is good enough)
>
> Same answer as above.
>
> > How is the tag following documented (i.e. when is the user least
> > surprised that we do not tag-follow all and unconditionally)?
>
> It's documented under the --no-tags option in the man page for git
> fetch. I'm not sure what you mean by the user being surprised.
--
Brandon Williams
next prev parent reply other threads:[~2018-06-18 19:53 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-05 21:16 [PATCH 0/2] Fix protocol v2 tag following with CLI refspec Jonathan Tan
2018-06-05 21:16 ` [PATCH 1/2] t5702: test fetch with multiple refspecs at a time Jonathan Tan
2018-06-05 21:16 ` [PATCH 2/2] fetch: send "refs/tags/" prefix upon CLI refspecs Jonathan Tan
2018-06-05 21:25 ` Brandon Williams
2018-06-05 21:28 ` Brandon Williams
2018-06-05 21:40 ` [PATCH v2 0/2] Fix protocol v2 tag following with CLI refspec Jonathan Tan
2018-06-05 21:40 ` [PATCH v2 1/2] t5702: test fetch with multiple refspecs at a time Jonathan Tan
2018-06-18 18:30 ` Stefan Beller
2018-06-18 19:15 ` Jonathan Tan
2018-06-18 19:32 ` Stefan Beller
2018-06-05 21:40 ` [PATCH v2 2/2] fetch: send "refs/tags/" prefix upon CLI refspecs Jonathan Tan
2018-06-18 19:22 ` Stefan Beller
2018-06-18 19:47 ` Jonathan Tan
2018-06-18 19:53 ` Brandon Williams [this message]
2018-06-18 19:58 ` Junio C Hamano
2018-06-18 21:07 ` Jonathan Tan
2018-06-18 21:27 ` Junio C Hamano
2018-06-18 23:16 ` Jonathan Tan
2018-07-09 17:38 ` Jonathan Nieder
2018-07-09 17:59 ` Brandon Williams
2018-07-09 18:24 ` Junio C Hamano
2018-07-09 18:33 ` Brandon Williams
2018-07-09 20:35 ` 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=20180618195336.GE73085@google.com \
--to=bmwill@google.com \
--cc=git@vger.kernel.org \
--cc=jonathantanmy@google.com \
--cc=sbeller@google.com \
/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).