diff options
authorJeff King <>2015-02-16 06:13:25 (GMT)
committerJunio C Hamano <>2015-02-17 18:49:29 (GMT)
commit06c21e18abc9ae4647c79449a9b0a1554553ad03 (patch)
parentd16c33b4c11cda583ca2b6f7b81da3ac2fdebfa4 (diff)
cmd_push: pass "flags" pointer to config callback
This will let us manipulate any transport flags which have matching config options (there are none yet, but we will add one in the next patch). We could also just make "flags" a static file-scope global, but the result is a little confusing. We end up passing it along through do_push and push_with_options, each of which further munge it. Having slightly-differing versions of the flags variable available to those functions would probably cause more confusion than it is worth. Let's just keep the original local to cmd_push, and it can continue to pass it through the call-stack. Signed-off-by: Jeff King <> Signed-off-by: Junio C Hamano <>
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/push.c b/builtin/push.c
index 1e7ac8d..bba22b8 100644
--- a/builtin/push.c
+++ b/builtin/push.c
@@ -522,7 +522,7 @@ int cmd_push(int argc, const char **argv, const char *prefix)
- git_config(git_push_config, NULL);
+ git_config(git_push_config, &flags);
argc = parse_options(argc, argv, prefix, options, push_usage, 0);
if (deleterefs && (tags || (flags & (TRANSPORT_PUSH_ALL | TRANSPORT_PUSH_MIRROR))))