summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorNicolas Morey-Chaisemartin <nicolas@morey-chaisemartin.com>2017-09-06 06:48:06 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-09-07 00:51:29 (GMT)
commitcad0c6928eae87dc8619b035e4eced5f2c662a12 (patch)
tree857a639ccd6034730d90db48c410a0fe57751262 /builtin
parent3ec7d702a89c647ddf42a59bc3539361367de9d5 (diff)
downloadgit-cad0c6928eae87dc8619b035e4eced5f2c662a12.zip
git-cad0c6928eae87dc8619b035e4eced5f2c662a12.tar.gz
git-cad0c6928eae87dc8619b035e4eced5f2c662a12.tar.bz2
pull: fix cli and config option parsing order
pull parses first the cli options and then the config option. The expected behavior is the other way around, so that config options can not override the cli ones. This patch changes the parsing order so config options are parsed first. Signed-off-by: Nicolas Morey-Chaisemartin <nicolas@morey-chaisemartin.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r--builtin/pull.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/pull.c b/builtin/pull.c
index 7fe2814..9ef1ab5 100644
--- a/builtin/pull.c
+++ b/builtin/pull.c
@@ -815,6 +815,8 @@ int cmd_pull(int argc, const char **argv, const char *prefix)
if (!getenv("GIT_REFLOG_ACTION"))
set_reflog_message(argc, argv);
+ git_config(git_pull_config, NULL);
+
argc = parse_options(argc, argv, prefix, pull_options, pull_usage, 0);
parse_repo_refspecs(argc, argv, &repo, &refspecs);
@@ -825,8 +827,6 @@ int cmd_pull(int argc, const char **argv, const char *prefix)
if (opt_rebase < 0)
opt_rebase = config_get_rebase();
- git_config(git_pull_config, NULL);
-
if (read_cache_unmerged())
die_resolve_conflict("pull");