Skip to content

Commit

Permalink
cmd_push: pass "flags" pointer to config callback
Browse files Browse the repository at this point in the history
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 <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Jeff King authored and Junio C Hamano committed Feb 17, 2015
1 parent d16c33b commit 06c21e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion builtin/push.c
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ int cmd_push(int argc, const char **argv, const char *prefix)
};

packet_trace_identity("push");
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))))
Expand Down

0 comments on commit 06c21e1

Please sign in to comment.