git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Ronan Pigott" <ronan@rjp.ie>
To: "Jeff King" <peff@peff.net>
Cc: git@vger.kernel.org
Subject: Re: Fetching too many tags?
Date: Sat, 12 Aug 2023 01:04:42 +0000	[thread overview]
Message-ID: <053992e6ab7c43d484c46901d31313019494daed@rjp.ie> (raw)
In-Reply-To: <20230811235820.GA3311880@coredump.intra.peff.net>

> No, the "negotiation" phase only happens when there are objects to
> fetch, and the client and server have to agree on which ones. That's not
> happening at all in your case (so --negotiation-tip won't have any
> effect).

Ah, I see.

> The feature I was thinking of is that in Git's "v2" protocol, the client
> gets to speak first, and so it can say "btw, I am only interested in
> these refs". v2 became the default in git v2.29 (of course both client
> and server have to support it, but kernel.org is definitely up to date
> there).
> 
> You can see it in action with something like this:
> 
>  GIT_TRACE_PACKET=1 git fetch --no-tags origin master
> 
> The "ref-prefix" lines are the client telling the server which prefixes
> it's interested in (we have to ask for several variants because "master"
> from the command line gets fully qualified based on what the other side
> offers). Try it without --no-tags and you'll see a wider ref-prefix
> request. If you try:

Thanks. I tried this and indeed without --no-tags there is an additional line

> 17:41:29.163545 pkt-line.c:86   packet:   git< ref-prefix refs/tags/

I understand now that this is why the server is telling me about all those tags.
I had thought it would only need to tell me about tags that point to something
reachable from master, and was confused why the server was advertising all the
tags.

Thanks,
Ronan

      parent reply	other threads:[~2023-08-12  1:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-10  6:08 Fetching too many tags? Ronan Pigott
2023-08-11 18:09 ` Jeff King
2023-08-11 22:06 ` Ronan Pigott
2023-08-11 23:58   ` Jeff King
2023-08-12  1:04   ` Ronan Pigott [this message]

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=053992e6ab7c43d484c46901d31313019494daed@rjp.ie \
    --to=ronan@rjp.ie \
    --cc=git@vger.kernel.org \
    --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 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).