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

Re: Resumable git clone?

From
AVAl Viro <viro@zeniv.linux.org.uk>
Date
Mar 2, 2016, 02:30 UTC
Message-ID
<20160302023024.GG17997@ZenIV.linux.org.uk>
In-Reply-To
<CAGZ79kYjuaOiTCC-NnZDQs=XGbgXWhJe7gk576jod4QnV57eEg@mail.gmail.com>
On Tue, Mar 01, 2016 at 05:40:28PM -0800, Stefan Beller wrote:
> So throwing away half finished stuff while keeping the front load?
Throw away the object that got truncated and ones for which delta chain
doesn't resolve entirely in the transferred part.
 
Show 7 quoted lines
> > indexing the objects it
> > contains, and then re-running clone and not having to fetch those
> > objects.
> 
> The pack is not deterministic for a given repository. When creating
> the pack, you may encounter races between threads, such that the order
> in a pack differs.

FWIW, I wasn't proposing to recreate the remaining bits of that _pack_; just do the normal pull with one addition: start with sending the list of sha1 of objects you are about to send and let the recepient reply with "I already have <set of sha1>, don't bother with those". And exclude those from the transfer. Encoding for the set being available is an interesting variable here - might be plain list of sha1, might be its complement ("I want the following subset"), might be "145th to 1029th, 1517th and 1890th to 1920th of the list you've sent"; which form ends up more efficient needs to be found experimentally...

IIRC, the objection had been that the organisation of the pack will lead to many cases when deltas are transferred *first*, with base object not getting there prior to disconnect. I suspect that fraction of the objects getting through would still be worth it, but I hadn't experimented enough to be able to tell...

I was more interested in resumable _pull_, with restarted clone treated as special case of that.

Previous: Stefan BellerNext: Junio C Hamano
Message 3 of 24 in “Resumable git clone?”
  1. Josh TriplettMar 2, 2016
  2. Stefan BellerMar 2, 2016
  3. Al ViroMar 2, 2016
  4. Junio C HamanoMar 2, 2016
  5. Duy NguyenMar 2, 2016
  6. Duy NguyenMar 2, 2016
  7. Josh TriplettMar 2, 2016
  8. Junio C HamanoMar 2, 2016
  9. Duy NguyenMar 2, 2016
  10. Josh TriplettMar 2, 2016
  11. Josh TriplettMar 2, 2016
  12. Duy NguyenMar 2, 2016
  13. Jeff KingMar 2, 2016
  14. Bhavik BavishiMar 2, 2016
  15. Josh TriplettMar 2, 2016
  16. Duy NguyenMar 2, 2016
  17. Duy NguyenMar 2, 2016
  18. Junio C HamanoMar 2, 2016
  19. Konstantin RyabitsevMar 2, 2016
  20. Josh TriplettMar 2, 2016
  21. Junio C HamanoMar 2, 2016
  22. Philip OakleyMar 24, 2016
  23. Junio C HamanoMar 24, 2016
  24. Philip OakleyMar 24, 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.