diff options
| author | Xing Xin <xingxin.xx@bytedance.com> | 2024-10-08 03:38:17 +0000 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-10-08 10:22:08 -0700 |
| commit | 094f78a16a6c150ff125afd9c3f2773b47384c06 (patch) | |
| tree | bfb4f22d98efb40b762357519f57aa2d2ab0154e /Documentation | |
| parent | 72da5cfb1c81a1835a1f6bad5f19451baf9ad03c (diff) | |
| download | git-094f78a16a6c150ff125afd9c3f2773b47384c06.tar.xz | |
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 <xingxin.xx@bytedance.com>
Reviewed-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
| -rw-r--r-- | Documentation/fetch-options.txt | 3 | ||||
| -rw-r--r-- | Documentation/git-clone.txt | 3 | ||||
| -rw-r--r-- | Documentation/git-ls-remote.txt | 3 |
3 files changed, 9 insertions, 0 deletions
diff --git a/Documentation/fetch-options.txt b/Documentation/fetch-options.txt index 80838fe37e..9dc7ac8dbd 100644 --- a/Documentation/fetch-options.txt +++ b/Documentation/fetch-options.txt @@ -305,6 +305,9 @@ endif::git-pull[] unknown ones, is server-specific. When multiple `--server-option=<option>` are given, they are all sent to the other side in the order listed on the command line. + When no `--server-option=<option>` is given from the command line, + the values of configuration variable `remote.<name>.serverOption` + are used instead. --show-forced-updates:: By default, git checks if a branch is force-updated during 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=++__<option>__ are given, they are all sent to the other side in the order listed on the command line. + When no ++--server-option=++__<option>__ is given from the command + line, the values of configuration variable `remote.<name>.serverOption` + are used instead. `-n`:: `--no-checkout`:: diff --git a/Documentation/git-ls-remote.txt b/Documentation/git-ls-remote.txt index 76c86c3ce4..d71c4ab3e2 100644 --- a/Documentation/git-ls-remote.txt +++ b/Documentation/git-ls-remote.txt @@ -81,6 +81,9 @@ OPTIONS character. When multiple `--server-option=<option>` are given, they are all sent to the other side in the order listed on the command line. + When no `--server-option=<option>` is given from the command line, + the values of configuration variable `remote.<name>.serverOption` + are used instead. <repository>:: The "remote" repository to query. This parameter can be |
