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

[PATCH 0/3] Fix promisor-remote reply missing from fetch

From
Christian Couder <christian.couder@gmail.com>
Date
Nov 12, 2026, 19:58 UTC
Message-ID
<20261112195858.53788-5-christian.couder@gmail.com>

This small series fixes a brown paper bag bug in the "promisor-remote" protocol v2 capability found by Matt Cote during the NVIDIA hackathon following the Gerrit User Summit 2026.

The client doesn't send a "promisor-remote=..." reply with the `fetch` protocol commands. It does send such a reply with the `ls-refs` and `bundle-uri` protocol commands. So this works by luck with a Git server over file:// or ssh://, as the same `upload-pack` process handles all the requests and remembers the reply from `ls-refs`.

But it doesn't work with servers that handle each request on its own, like Git over HTTP or JGit (so Gerrit). It also doesn't work when only object IDs are fetched, as no `ls-refs` is sent then.

In these cases, the server doesn't know that the client accepted a promisor remote, so it doesn't allow the objects available on the accepted promisor remotes to be missing from the pack, and fails with "could not fetch <oid> from promisor remote".

This has been the case since the capability was introduced in v2.49, so it would be nice to have the fix in maint too.

Other related issues were found during the hackathon, but this one is the most annoying. The others will be addressed in separate series.

Overview of the patches =======================

  - Patch 1/3 lets write_command_and_capabilities() send a
    promisor-remote reply, without any change in behavior.
  - Patch 2/3 is the actual fix, with new tests in t5710, and in a new
    t5711 test script for HTTP.
  - Patch 3/3 documents that the client should send the reply with
    `fetch`.

CI tests ========

Some failed, others didn't even started, see:
https://github.com/chriscool/git/actions/runs/43285535901
But the failures all seem related to the test infrastructure.
Christian Couder (3):
  connect: let write_command_and_capabilities() send a promisor-remote
    reply
  fetch-pack: ensure fetch sends a promisor-remote reply
  doc: gitprotocol-v2: send the promisor-remote reply with fetch
 Documentation/gitprotocol-v2.adoc          |   6 +
 connect.c                                  |   6 +-
 connect.h                                  |   6 +-
 fetch-object-info.c                        |   3 +-
 fetch-pack.c                               |  17 ++-
 t/meson.build                              |   1 +
 t/t5710-promisor-remote-capability.sh      |  40 +++++++
 t/t5711-promisor-remote-capability-http.sh | 126 +++++++++++++++++++++
 8 files changed, 196 insertions(+), 9 deletions(-)
 create mode 100755 t/t5711-promisor-remote-capability-http.sh
base-commit: 1891de46f79dc444a47db1c87bd0c8c76b5463f2
-- 
2.56.0
Next: Christian Couder
Message 1 of 8 in “Fix promisor-remote reply missing from fetch”
  1. 0/3 Fix promisor-remote reply missing from fetchChristian Couder, Nov 12, 2026
  2. 1/3 connect: let write_command_and_capabilities() send a promisor-remote replyChristian Couder, Nov 12, 2026
  3. Junio C HamanoNov 12, 2026
  4. Junio C HamanoNov 12, 2026
  5. Christian CouderNov 13, 2026
  6. Junio C HamanoNov 13, 2026
  7. 2/3 fetch-pack: ensure fetch sends a promisor-remote replyChristian Couder, Nov 12, 2026
  8. 3/3 doc: gitprotocol-v2: send the promisor-remote reply with fetchChristian Couder, Nov 12, 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.