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

Re: With big repos and slower connections, git clone can be hard to work with

From
Toon claes <toon@iotcl.com>
Date
Jun 13, 2024, 10:10 UTC
Message-ID
<87msnpjgqc.fsf@iotcl.com>
In-Reply-To
<f5c24dfc-8d35-4418-b8f6-0a03d70c0917@horse64.org>
ellie <el@horse64.org> writes:
> Sorry for again another total newcomer/outsider question:
Don't apologize for asking these questions, you're more than welcome.
> Is a bundle or pack file something any regular git HTTPS instance
> would naturally provide when setup the usual ways?

Yes and no. Bundle and packfile format can used in many places. Packfiles are used to transfer a bunch of objects, or store them locally in Git's object database. A bundle is a packfile, but with a leading header describing refs. You can read about that at https://git-scm.com/docs/gitformat-bundle.

Show 6 quoted lines
> Like, if resume relied on that, would this work when following the
> standard smart HTTP setup procedure
> https://git-scm.com/book/en/v2/Git-on-the-Server-Smart-HTTP (sorry if
> I got the wrong link) and then git cloning from that? That would
> result in the best availability of such a resume feature, if it ever
> came to be.

As mentioned elsewhere in the thread, on clone (and fetch) the client negotiates with the server which objects to download. Because the state of the remote repository can change between clones, so will the result of this negotiation. This means the content of the packfile sent over might differ, which is disruptive for caching these files.

That's why the proposal of bundle URI or packfile URI is suggested. In case of bundle URI, it will tell the client to download a pre-made bundle before starting the negotiation. This bundle can be stored on a CDN or whatever static HTTP(s) server. But it requires the server to create it, store it, and tell the client about it. This is not something that's builtin into Git itself at the moment.

This is not really related to the Smart HTTP protocol, because it can be used over SSH as well. But when such file is stored on a regular HTTP server, we can rely on resumable downloads. Only after that bundle is downloaded, the client will start the negotiation with the server to get missing objects and refs (which should be a small subset when the bundle is recent).

-- Toon

Previous: ellieNext: Jeff King
Message 18 of 43 in “With big repos and slower connections, git clone can be hard to work with”
  1. ellieJun 7, 2024
  2. rsbecker@nexbridge.comJun 7, 2024
  3. ellieJun 8, 2024
  4. rsbecker@nexbridge.comJun 8, 2024
  5. ellieJun 8, 2024
  6. Jeff KingJun 8, 2024
  7. ellieJun 8, 2024
  8. ellieJun 8, 2024
  9. Jeff KingJun 8, 2024
  10. Jeff KingJun 8, 2024
  11. ellieJun 8, 2024
  12. Junio C HamanoJun 8, 2024
  13. ellieJun 8, 2024
  14. Patrick SteinhardtJun 10, 2024
  15. Emily ShafferJun 10, 2024
  16. Junio C HamanoJun 10, 2024
  17. ellieJun 10, 2024
  18. Toon claesJun 13, 2024
  19. Jeff KingJun 11, 2024
  20. Junio C HamanoJun 11, 2024
  21. Sitaram ChamartyJun 29, 2024
  22. Jeff KingJun 11, 2024
  23. Ivan FradeJun 11, 2024
  24. ellieJul 7, 2024
  25. rsbecker@nexbridge.comJul 8, 2024
  26. ellieJul 8, 2024
  27. rsbecker@nexbridge.comJul 8, 2024
  28. ellieJul 8, 2024
  29. Konstantin KhomoutovJul 8, 2024
  30. rsbecker@nexbridge.comJul 8, 2024
  31. ellieJul 8, 2024
  32. rsbecker@nexbridge.comJul 8, 2024
  33. ellieJul 8, 2024
  34. rsbecker@nexbridge.comJul 8, 2024
  35. ellieJul 8, 2024
  36. rsbecker@nexbridge.comJul 8, 2024
  37. Emanuel CziraiJul 8, 2024
  38. Konstantin KhomoutovJul 8, 2024
  39. rsbecker@nexbridge.comJul 8, 2024
  40. ellieJul 14, 2024
  41. ellieJul 24, 2024
  42. EllieSep 8, 2025
  43. EllieSep 30, 2024

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.