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

Re: [PATCH 1/3] connect: let write_command_and_capabilities() send a promisor-remote reply

From
Christian Couder <christian.couder@gmail.com>
Date
Nov 20, 2026, 16:57 UTC
Message-ID
<CAP8UFD1ZDzDvYxF1TjTjBo0SFHfwPdpRrgixRQXN72RxpoJOxw@mail.gmail.com>
In-Reply-To
<xmqqh5hkbl6t.fsf@gitster.g>
On Fri, Nov 13, 2026 at 8:11 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 12 quoted lines
>
> Christian Couder <christian.couder@gmail.com> writes:
>
> > They duplicate code for sending "server-option", "agent" and
> > "object-format", while each sends a different set of capabilities.
>
> That is all the more reason to clean them up before we pile more
> stuff on top, no?
>
> I do not know if that deserves to be called "significant"
> refactoring, though.  It would not take a series with 20 patches
> each of which weigh more than 30 lines touched, no?

As you can see in the v2 I just sent, it took 6 refactoring patches instead of 1.

The diffstat is now:
 Documentation/gitprotocol-v2.adoc          |   7 ++
 connect.c                                  | 128 ++++++++++++---------
 connect.h                                  |  30 ++++-
 fetch-object-info.c                        |   7 +-
 fetch-pack.c                               |  23 ++--
 t/meson.build                              |   1 +
 t/t5705-session-id-in-capabilities.sh      |  26 +++++
 t/t5710-promisor-remote-capability.sh      |  40 +++++++
 t/t5711-promisor-remote-capability-http.sh | 126 ++++++++++++++++++++
 9 files changed, 322 insertions(+), 66 deletions(-)
 create mode 100755 t/t5711-promisor-remote-capability-http.sh
instead of:
 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
Thanks.
Previous: Junio C HamanoNext: Christian Couder
Message 7 of 18 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. Christian CouderNov 20, 2026
  8. 2/3 fetch-pack: ensure fetch sends a promisor-remote replyChristian Couder, Nov 12, 2026
  9. 3/3 doc: gitprotocol-v2: send the promisor-remote reply with fetchChristian Couder, Nov 12, 2026
  10. 0/8 Fix promisor-remote reply missing from fetchChristian Couder, Nov 20, 2026
  11. 1/8 connect: pass capability lines to write_command_and_capabilities()Christian Couder, Nov 20, 2026
  12. 2/8 connect: send session-id with ls-refs and bundle-uriChristian Couder, Nov 20, 2026
  13. 3/8 connect: pass a reader to write_command_and_capabilities()Christian Couder, Nov 20, 2026
  14. 4/8 connect: buffer the ls-refs and bundle-uri requestsChristian Couder, Nov 20, 2026
  15. 5/8 connect: use write_command_and_capabilities() in get_remote_refs()Christian Couder, Nov 20, 2026
  16. 6/8 connect: use write_command_and_capabilities() in get_remote_bundle_uri()Christian Couder, Nov 20, 2026
  17. 7/8 fetch-pack: ensure fetch sends a promisor-remote replyChristian Couder, Nov 20, 2026
  18. 8/8 doc: gitprotocol-v2: send the promisor-remote reply with fetchChristian Couder, Nov 20, 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.