diff options
| author | Xing Xin <xingxin.xx@bytedance.com> | 2024-10-08 03:38:15 +0000 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-10-08 10:22:06 -0700 |
| commit | 06708ce18066b40e05fba22491542d95b43b0f22 (patch) | |
| tree | be890a0ddfcb941369ef4c22962db3ac4ba1e89d /builtin/push.c | |
| parent | 777489f9e09c8d0dd6b12f9d90de6376330577a2 (diff) | |
| download | git-06708ce18066b40e05fba22491542d95b43b0f22.tar.gz | |
transport: introduce parse_transport_option() method
Add the `parse_transport_option()` method to parse the `push.pushOption`
configuration. This method will also be used in the next commit to
handle the new `remote.<name>.serverOption` configuration for setting
server options in Git protocol v2.
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 'builtin/push.c')
| -rw-r--r-- | builtin/push.c | 9 |
1 files changed, 1 insertions, 8 deletions
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; |
