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

Re: Resumable git clone?

From
Stefan Beller <sbeller@google.com>
Date
Mar 2, 2016, 01:40 UTC
Message-ID
<CAGZ79kYjuaOiTCC-NnZDQs=XGbgXWhJe7gk576jod4QnV57eEg@mail.gmail.com>
In-Reply-To
<20160302012922.GA17114@jtriplet-mobl2.jf.intel.com>
+ Duy, who tried resumable clone a few days/weeks ago
On Tue, Mar 1, 2016 at 5:30 PM, Josh Triplett <josh@joshtriplett.org> wrote:
Show 10 quoted lines
> If you clone a repository, and the connection drops, the next attempt
> will have to start from scratch.  This can add significant time and
> expense if you're on a low-bandwidth or metered connection trying to
> clone something like Linux.
>
> Would it be possible to make git clone resumable after a partial clone?
> (And, ideally, to make that the default?)
>
> In a discussion elsewhere, Al Viro suggested taking the partial pack
> received so far,
ok,
> repairing any truncation,
So throwing away half finished stuff while keeping the front load?
> 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.

Show 6 quoted lines
> This may also require extending receive-pack's protocol for
> determining objects the recipient already has, as the partial pack may
> not have a consistent set of reachable objects.
>
> Before starting down the path of developing patches for this, does the
> approach seem potentially reasonable?

I think that sounds reasonable on a high level, but I'd expect it blows up in complexity as in the receive-pack's protocol or in the code for having to handle partial stuff.

Thanks, Stefan

Show 6 quoted lines
>
> - Josh Triplett
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous: Josh TriplettNext: Al Viro
Message 2 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.