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

Re: RFC: Resumable clone based on hybrid "smart" and "dumb" HTTP

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Feb 10, 2016, 21:22 UTC
Message-ID
<20160210212207.GB10155@google.com>
In-Reply-To
<xmqqh9hgz3km.fsf@gitster.mtv.corp.google.com>
Junio C Hamano wrote:
> I somehow doubt it.  Both index-pack and lost-found need to trace
> "object A depends on object B", but the similarity ends there.

You already responded about this in another side-thread, so the following is mostly redundant. :) I think this message can still be useful to future readers since it more explicitly goes through the trade-offs.

The relevant similarity is that both index-pack and lost-found need to inflate all commit, tag, and tree objects.

This is the same idea that led to the introduction of "git index-pack --strict".

[...]
Show 7 quoted lines
> I am not quite sure if that is an advantage, though.  The second
> message proposes that the lost-found computation to be done by the
> client using *.pack, but any client, given the same *.pack, will
> compute the same result, so if the result is computed on the server
> side just once when the *.pack is prepared and downloaded to the
> client, it would give us a better overall resource utilization.  And
> in essence, that was what the *.info file in the first message was.
Advantages of not providing the list of roots:
 1. only need one round-trip to serve the packfile as-is
 2. less data sent over the wire (not important unless the list of roots
    is long)
 3. can be enabled on the server for existing repositories without an
    extra step of generating .info files
Advantage of providing the list of roots:
- speedup because the client does not have to compute the list of roots

For a client that is already iterating over all objects and inspecting FLAG_LINK, the advantage (3) seems compelling enough to prefer the protocol that doesn't sent a list of roots.

Except when people pass --depth, "git clone" sets 'check_self_contained_and_connected = 1'. That means clients that already iterate over all objects and inspect FLAG_LINK are the usual case.

Thanks for your thoughtfulness, Jonathan

Previous: Junio C HamanoNext: Jeff King
Message 5 of 24 in “RFC: Resumable clone based on hybrid "smart" and "dumb" HTTP”
  1. Shawn PearceFeb 10, 2016
  2. Shawn PearceFeb 10, 2016
  3. Stefan BellerFeb 10, 2016
  4. Junio C HamanoFeb 10, 2016
  5. Jonathan NiederFeb 10, 2016
  6. Jeff KingFeb 10, 2016
  7. Jonathan NiederFeb 10, 2016
  8. Junio C HamanoFeb 10, 2016
  9. Junio C HamanoFeb 11, 2016
  10. Shawn PearceFeb 11, 2016
  11. Duy NguyenFeb 11, 2016
  12. Junio C HamanoFeb 13, 2016
  13. Jeff KingFeb 10, 2016
  14. Jonathan NiederFeb 10, 2016
  15. Jeff KingFeb 10, 2016
  16. Junio C HamanoFeb 10, 2016
  17. Junio C HamanoFeb 11, 2016
  18. Jeff KingFeb 11, 2016
  19. Blake BurkhartFeb 13, 2016
  20. Jeff KingFeb 13, 2016
  21. Shawn PearceFeb 14, 2016
  22. Jeff KingFeb 14, 2016
  23. Shawn PearceFeb 14, 2016
  24. Stefan BellerFeb 16, 2016

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.