From 094f78a16a6c150ff125afd9c3f2773b47384c06 Mon Sep 17 00:00:00 2001 From: Xing Xin Date: Tue, 8 Oct 2024 03:38:17 +0000 Subject: transport.c::handshake: make use of server options from remote Utilize the `server_options` from the corresponding remote during the handshake in `transport.c` when Git protocol v2 is detected. This helps initialize the `server_options` in `transport.h:transport` if no server options are set for the transport (typically via `--server-option` or `-o`). While another potential place to incorporate server options from the remote is in `transport.c:transport_get`, setting server options for a transport using a protocol other than v2 could lead to unexpected errors (see `transport.c:die_if_server_options`). Relevant tests and documentation have been updated accordingly. Signed-off-by: Xing Xin Reviewed-by: Patrick Steinhardt Signed-off-by: Junio C Hamano --- Documentation/git-clone.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Documentation/git-clone.txt') diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt index 8e925db7e9..409fb3a3af 100644 --- a/Documentation/git-clone.txt +++ b/Documentation/git-clone.txt @@ -149,6 +149,9 @@ objects from the source repository into a pack in the cloned repository. unknown ones, is server-specific. When multiple ++--server-option=++__