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

Re: [PATCH v2 2/2] fetch: send "refs/tags/" prefix upon CLI refspecs

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 18, 2018, 21:27 UTC
Message-ID
<xmqqwouvwzsz.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<20180618210731.152140-1-jonathantanmy@google.com>
Jonathan Tan <jonathantanmy@google.com> writes:
Show 7 quoted lines
>> Wouldn't that allow us not having to advertise the whole tags
>> namespace only to implement the tag following?
>
> Yes, it would, but as far as I can tell, it would add an extra burden on
> the server to walk all refs requested in the ls-refs call (in order to
> determine which tags to send back in the response). Also, this walk must
> be done before any negotiation (since this is a ls-refs call),...

My comment was that I doubt the "must be done" part of the above. How would refs-in-want be responded where client-supplied "I want 'master' branch---I am not asking for the exact object the first server I contacted said where the 'master' is at" gets turned into "So the final value of 'master' among these servers that are not quite in sync is this" by the one that gives you the pack, not necessarily the one that responds to ls-refs upon initial contact? Can't we do something similar, i.e. let the client say "I want tags that refer to new objects you are going to send me, I do not know what they are offhand" and the server that actually gives you the pack to say "here are the tags I ended up including"? The "include-tag" process to generate pack with extra objects (i.e. the tags that point at packed objects) has to involve walking for reachabliity anyway, so as long as the feature is supported, somebody has to do the work, and if you want to cut down the transfer cost of the refs/tags/* enumeration, it needs to happen on the server end, no?

Or perhaps v2 fetch should implement the automated tag following without using include-tag and instead as an extended feature of ref-in-want. I think that is merely giving a different name to the same idea outlined above, though ;-)

Previous: Jonathan TanNext: Jonathan Tan
Message 17 of 23 in “Fix protocol v2 tag following with CLI refspec”
  1. 0/2 Fix protocol v2 tag following with CLI refspecJonathan Tan, Jun 5, 2018
  2. 1/2 t5702: test fetch with multiple refspecs at a timeJonathan Tan, Jun 5, 2018
  3. 2/2 fetch: send "refs/tags/" prefix upon CLI refspecsJonathan Tan, Jun 5, 2018
  4. Brandon WilliamsJun 5, 2018
  5. Brandon WilliamsJun 5, 2018
  6. 0/2 Fix protocol v2 tag following with CLI refspecJonathan Tan, Jun 5, 2018
  7. 1/2 t5702: test fetch with multiple refspecs at a timeJonathan Tan, Jun 5, 2018
  8. Stefan BellerJun 18, 2018
  9. Jonathan TanJun 18, 2018
  10. Stefan BellerJun 18, 2018
  11. 2/2 fetch: send "refs/tags/" prefix upon CLI refspecsJonathan Tan, Jun 5, 2018
  12. Stefan BellerJun 18, 2018
  13. Jonathan TanJun 18, 2018
  14. Brandon WilliamsJun 18, 2018
  15. Junio C HamanoJun 18, 2018
  16. Jonathan TanJun 18, 2018
  17. Junio C HamanoJun 18, 2018
  18. Jonathan TanJun 18, 2018
  19. Jonathan NiederJul 9, 2018
  20. Brandon WilliamsJul 9, 2018
  21. Junio C HamanoJul 9, 2018
  22. Brandon WilliamsJul 9, 2018
  23. Junio C HamanoJul 9, 2018

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.