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

Re: [PATCH v2 3/3] fetch: use bundle URIs when having creationToken heuristic

From
Karthik Nayak <karthik.188@gmail.com>
Date
Jul 26, 2024, 09:06 UTC
Message-ID
<CAOLa=ZQ5bvWuBVC7FuT6+C2tB9FXr0mmexvBycRwUf6Ak_c_rA@mail.gmail.com>
In-Reply-To
<20240724144957.3033840-4-toon@iotcl.com>
Toon Claes <toon@iotcl.com> writes:
Show 6 quoted lines
> At the moment, bundle URIs are only used by git-clone(1). For a clone
> the use of bundle URI is trivial, because the repository is empty so
> downloading bundles will never result in downloading objects that are in
> the repository already.
>
> For git-fetch(1), this more complicated to use bundle URI. We want to
Nit: s/this/it is/
Show 5 quoted lines
> avoid downloading bundles that only contains objects that are in the
> local repository already.
>
> One way to achieve this is possible when the "creationToken" heuristic
> is used for bundle URIs. We attempt to download and unbundle the minimum

This first sentence reads a bit weird. Perhaps, "One way to achieve this is to restrict the usage of bundle URIs to the 'creationToken' heuristic for git-fetch(1)."?

Show 18 quoted lines
> number of bundles by creationToken in decreasing order. If we fail to
> unbundle (after a successful download) then move to the next
> non-downloaded bundle and attempt downloading. Once we succeed in
> applying a bundle, move to the previous unapplied bundle and attempt to
> unbundle it again. At the end the highest applied creationToken is
> written to `fetch.bundleCreationToken` in the git-config. The next time
> bundles are advertised by the server, bundles with a lower creationToken
> value are ignored. This was already implemented by
> 7903efb717 (bundle-uri: download in creationToken order, 2023-01-31) in
> fetch_bundles_by_token().
>
> Using the creationToken heuristic is optional, but without it the client
> has no idea which bundles are new, how to sort them, and which only have
> objects the client already has.
>
> With this knowledge, make git-fetch(1) use bundle URIs from the server,
> but only when the creationToken heuristic is used.
>

I would say that apart from all this it is also worth noting that bundle URIs are still opt-in from the client side.

Rest of the patch looks good to me.
Thanks
[snip]
Previous: Toon ClaesNext: Patrick Steinhardt
Message 12 of 17 in “fetch: use bundle URIs when having creationToken heuristic”
  1. fetch: use bundle URIs when having creationToken heuristicToon Claes, Jul 22, 2024
  2. Junio C HamanoJul 22, 2024
  3. 0/3 fetch: use bundle URIs when having creationToken heuristicToon Claes, Jul 24, 2024
  4. 1/3 clone: remove double bundle list clear codeToon Claes, Jul 24, 2024
  5. Karthik NayakJul 26, 2024
  6. Justin ToblerJul 26, 2024
  7. Toon claesAug 2, 2024
  8. 2/3 transport: introduce transport_has_remote_bundle_uri()Toon Claes, Jul 24, 2024
  9. Karthik NayakJul 26, 2024
  10. Junio C HamanoJul 26, 2024
  11. 3/3 fetch: use bundle URIs when having creationToken heuristicToon Claes, Jul 24, 2024
  12. Karthik NayakJul 26, 2024
  13. Patrick SteinhardtJul 26, 2024
  14. Toon claesAug 2, 2024
  15. Patrick SteinhardtAug 22, 2024
  16. Toon ClaesSep 27, 2024
  17. builtin/clone: teach git-clone(1) the --ref= argumentToon Claes, Sep 27, 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.