From: Christian Couder Date: Thu, 12 Nov 2026 19:58:59 GMT Subject: [PATCH 0/3] Fix promisor-remote reply missing from fetch 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 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