diff options
Diffstat (limited to 'builtin/push.c')
| -rw-r--r-- | builtin/push.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/builtin/push.c b/builtin/push.c index 59d4485603..90de3746b5 100644 --- a/builtin/push.c +++ b/builtin/push.c @@ -1,7 +1,9 @@ /* * "git push" */ + #define USE_THE_REPOSITORY_VARIABLE + #include "builtin.h" #include "advice.h" #include "branch.h" @@ -417,7 +419,7 @@ static int do_push(int flags, const struct string_list *push_options, struct remote *remote) { - int i, errs; + int errs; struct strvec *url; struct refspec *push_refspec = &rs; @@ -432,7 +434,7 @@ static int do_push(int flags, } errs = 0; url = push_url_of_remote(remote); - for (i = 0; i < url->nr; i++) { + for (size_t i = 0; i < url->nr; i++) { struct transport *transport = transport_get(remote, url->v[i]); if (flags & TRANSPORT_PUSH_OPTIONS) @@ -519,14 +521,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; |
