diff options
| author | Taylor Blau <me@ttaylorr.com> | 2024-10-15 16:56:43 -0400 |
|---|---|---|
| committer | Taylor Blau <me@ttaylorr.com> | 2024-10-15 16:56:43 -0400 |
| commit | fd98f659fda5a7704b10033f2b2efdae2b0a58e6 (patch) | |
| tree | c917e68cfe31b741e4aad16922ce7d5466f36dc4 /builtin | |
| parent | 8a5545b949287eb09597d1c37130539f50a2e09a (diff) | |
| parent | 0f490d270aa015f0bcb6a99c666eaa5b83f5d375 (diff) | |
| download | git-fd98f659fda5a7704b10033f2b2efdae2b0a58e6.tar.xz | |
Merge branch 'xx/remote-server-option-config'
A new configuration variable remote.<name>.serverOption makes the
transport layer act as if the --serverOption=<value> option is
given from the command line.
* xx/remote-server-option-config:
ls-remote: leakfix for not clearing server_options
fetch: respect --server-option when fetching multiple remotes
transport.c::handshake: make use of server options from remote
remote: introduce remote.<name>.serverOption configuration
transport: introduce parse_transport_option() method
Diffstat (limited to 'builtin')
| -rw-r--r-- | builtin/fetch.c | 2 | ||||
| -rw-r--r-- | builtin/ls-remote.c | 1 | ||||
| -rw-r--r-- | builtin/push.c | 9 |
3 files changed, 4 insertions, 8 deletions
diff --git a/builtin/fetch.c b/builtin/fetch.c index 80a64d0d26..d9027e4dc9 100644 --- a/builtin/fetch.c +++ b/builtin/fetch.c @@ -1981,6 +1981,8 @@ static int fetch_multiple(struct string_list *list, int max_children, strvec_pushl(&argv, "-c", "fetch.bundleURI=", "fetch", "--append", "--no-auto-gc", "--no-write-commit-graph", NULL); + for (i = 0; i < server_options.nr; i++) + strvec_pushf(&argv, "--server-option=%s", server_options.items[i].string); add_options_to_argv(&argv, config); if (max_children != 1 && list->nr != 1) { diff --git a/builtin/ls-remote.c b/builtin/ls-remote.c index f723b3bf3b..423318f87e 100644 --- a/builtin/ls-remote.c +++ b/builtin/ls-remote.c @@ -173,5 +173,6 @@ int cmd_ls_remote(int argc, transport_ls_refs_options_release(&transport_options); strvec_clear(&pattern); + string_list_clear(&server_options, 0); return status; } diff --git a/builtin/push.c b/builtin/push.c index 59d4485603..51c609f208 100644 --- a/builtin/push.c +++ b/builtin/push.c @@ -519,14 +519,7 @@ static int git_push_config(const char *k, const char *v, RECURSE_SUBMODULES_ON_DEMAND : RECURSE_SUBMODULES_OFF; recurse_submodules = val; } else if (!strcmp(k, "push.pushoption")) { - if (!v) - return config_error_nonbool(k); - else - if (!*v) - string_list_clear(&push_options_config, 0); - else - string_list_append(&push_options_config, v); - return 0; + return parse_transport_option(k, v, &push_options_config); } else if (!strcmp(k, "color.push")) { push_use_color = git_config_colorbool(k, v); return 0; |
