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

Re: [PATCH] http: handle absolute-path alternates from server root

From
Jeff King <peff@peff.net>
Date
May 22, 2026, 04:55 UTC
Message-ID
<20260522045503.GB861761@coredump.intra.peff.net>
In-Reply-To
<ag7xbkTF11N22waX@pks.im>
On Thu, May 21, 2026 at 01:50:06PM +0200, Patrick Steinhardt wrote:
Show 17 quoted lines
> > Packfile URIs help with the actual pack generation (even if we're
> > blitting out bits from the disk with verbatim packfile reuse, we still
> > have to handle gaps and compute the checksum over the output pack).
> > 
> > But it doesn't help with the server computing the set of objects the
> > client needs in the first place. IIRC, packfile URIs work by the server
> > saying "oh, I was going to send you object XYZ, but you can get it from
> > this stable pack instead". So the server still has to compute the set of
> > objects (and send any that are not mentioned in URI packs). Bitmaps
> > help, but there's still non-trivial computation and storage on the
> > server.
> 
> I guess it depends on the actual server-side implementation, but in the
> general case this is of course true. A server could decide to for
> example overserve objects in case the client does a full clone, or it
> could arrange packfiles in a special way that allows it to serve at
> least some kinds of requests efficiently.

True, though you still have to receive the client wants/haves before getting to the packfile-uri phase. The alternative is for the server send URIs during the ref advertisement. But we have that, too, these days: the bundle-uri feature. (Which I completely forgot about while writing my earlier email).

So I do think that bundle-uris can probably be an adequate substitute for dumb-http in terms of reducing server load. Though...

> Packfile URIs definitely need some love to become feasible, yes, and I
> don't think they have evolved much since their introduction. I still
> feel like they are the better mechanism for offloading traffic compared
> to bundle URIs though, as we already have packfiles around anyway.

...yeah, I agree that storing both bundles and packs can be annoying for a server, depending on your setup. In theory it would not be hard for a slightly-clever server endpoint to store packfiles for regular Git to use, and then generate the bundles on the fly by cat-ing the bundle header and the packfile, both of which can be sent out as raw bytes without further processing.

Anyway, we are far afield from the patch that started this thread. ;) I do agree with the general notion that we _should_ be able to get smart-http close to the server-side expense of dumb-http with a few tricks like these.

-Peff
Previous: Patrick Steinhardt
Message 7 of 7 in “http: handle absolute-path alternates from server root”
  1. http: handle absolute-path alternates from server rootJeff King, May 12, 2026
  2. Junio C HamanoMay 13, 2026
  3. Jeff KingMay 13, 2026
  4. Patrick SteinhardtMay 15, 2026
  5. Jeff KingMay 15, 2026
  6. Patrick SteinhardtMay 21, 2026
  7. Jeff KingMay 22, 2026

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.