]> git.ipfire.org Git - thirdparty/git.git/commit
connect: make write_fetch_command_and_capabilities() more generic
authorPablo Sabater <pabloosabaterr@gmail.com>
Fri, 24 Jul 2026 10:54:18 +0000 (12:54 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 24 Jul 2026 15:46:59 +0000 (08:46 -0700)
commiteb1fbc64b705deaf600bbba777616209280f43a5
treecf5adbdecf6528bea692c393a0636da2224426a4
parent40865f70d44d0665b0a0bd59acb8e18091d505a9
connect: make write_fetch_command_and_capabilities() more generic

Refactor write_fetch_command_and_capabilities(), enabling it to serve
both fetch and additional commands.

In this context, "command" refers to the "operations" supported by
Git's wire protocol Documentation/gitprotocol-v2.adoc, such as a Git
subcommand (e.g., git-fetch(1)) or a server-side operation like
"object-info" as implemented in commit a2ba162cda
(object-info: support for retrieving object info, 2021-04-20).

Refactor the function signature to accept a command instead of the
hardcoded "fetch".

Helped-by: Jonathan Tan <jonathantanmy@google.com>
Helped-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Calvin Wan <calvinwan@google.com>
Signed-off-by: Eric Ju <eric.peijian@gmail.com>
Signed-off-by: Pablo Sabater <pabloosabaterr@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
connect.c
connect.h
fetch-pack.c