Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2009-10-25 22:15:22 +0300
committerJunio C Hamano <gitster@pobox.com>2009-10-26 05:25:47 +0300
commit2aae905f23f79f004625346d057e5be7a81dbcd4 (patch)
tree27a2ce68477fa6d7670d3f076cbc89ef940dae4f
parent78d553b7d7b269bb22ebd8b1198657c37484a3a0 (diff)
push: always load default config
This is needed because we want to use the advice.pushnonfastforward variable. Previously, we would load the config on demand only when we needed to look at push.default. Which meant that "git push" would load it, but "git push remote" would not, leading to differing behavior. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--builtin-push.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/builtin-push.c b/builtin-push.c
index 3cb1ee46d1..8a19f10354 100644
--- a/builtin-push.c
+++ b/builtin-push.c
@@ -66,7 +66,6 @@ static void setup_push_tracking(void)
static void setup_default_push_refspecs(void)
{
- git_config(git_default_config, NULL);
switch (push_default) {
default:
case PUSH_DEFAULT_MATCHING:
@@ -173,7 +172,6 @@ int cmd_push(int argc, const char **argv, const char *prefix)
int tags = 0;
int rc;
const char *repo = NULL; /* default repository */
-
struct option options[] = {
OPT_BIT('q', "quiet", &flags, "be quiet", TRANSPORT_PUSH_QUIET),
OPT_BIT('v', "verbose", &flags, "be verbose", TRANSPORT_PUSH_VERBOSE),
@@ -191,6 +189,7 @@ int cmd_push(int argc, const char **argv, const char *prefix)
OPT_END()
};
+ git_config(git_default_config, NULL);
argc = parse_options(argc, argv, prefix, options, push_usage, 0);
if (tags)