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

Re: [PATCH/RFC] upload-pack: fix slow fetches from a shallow repository

From
Harald Nordgren <haraldnordgren@gmail.com>
Date
Oct 19, 2026, 14:50 UTC
Message-ID
<CAHwyqnWw+SDy357RN2ENMgThBfhZY+V_Vr7zR9HdR3DaGKV0cw@mail.gmail.com>
In-Reply-To
<xmqqpkx57rcv.fsf@gitster.g>
Show 11 quoted lines
> The advertise_shallow_grafts() function is written for protocol
> v0 and uses packet_write_fmt() to write raw data directly to the
> named file descriptor (in this case, fd #1).
>
> However, protocol v2 negotiation uses the packet_writer API.  When
> sideband-all is in use, the response must be multiplexed over the
> sideband channel.  Because the updated code fails to use the
> packet_writer API, 'shallow' lines are written without the '\001'
> band designator.  The other side then interprets 's' (the first
> byte of 'shallow', which is 115 in decimal) as the sideband channel
> and dies with a protocol violation.
Thanks for pointing this out! I'll take a look!
Harald
Previous: Junio C HamanoNext: Harald Nordgren via GitGitGadget
Message 3 of 5 in “upload-pack: fix slow fetches from a shallow repository”
  1. upload-pack: fix slow fetches from a shallow repositoryHarald Nordgren via GitGitGadget, Oct 17, 2026
  2. Junio C HamanoOct 19, 2026
  3. Harald NordgrenOct 19, 2026
  4. upload-pack: fix slow fetches from a shallow repositoryHarald Nordgren via GitGitGadget, Oct 20, 2026
  5. Harald NordgrenNov 11, 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.