git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Fetching too many tags?

From
Ronan Pigott <ronan@rjp.ie>
Date
Aug 12, 2023, 01:04 UTC
Message-ID
<053992e6ab7c43d484c46901d31313019494daed@rjp.ie>
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.
Show 15 quoted lines
> 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

Previous: Jeff King
Message 5 of 5 in “Fetching too many tags?”
  1. Ronan PigottAug 10, 2023
  2. Jeff KingAug 11, 2023
  3. Ronan PigottAug 11, 2023
  4. Jeff KingAug 11, 2023
  5. Ronan PigottAug 12, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.