Skip to content

Commit cad0c69

Browse files
nmoreygitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3ec7d70 commit cad0c69

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

builtin/pull.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -815,6 +815,8 @@ int cmd_pull(int argc, const char **argv, const char *prefix)
815815
if (!getenv("GIT_REFLOG_ACTION"))
816816
set_reflog_message(argc, argv);
817817

818+
git_config(git_pull_config, NULL);
819+
818820
argc = parse_options(argc, argv, prefix, pull_options, pull_usage, 0);
819821

820822
parse_repo_refspecs(argc, argv, &repo, &refspecs);
@@ -825,8 +827,6 @@ int cmd_pull(int argc, const char **argv, const char *prefix)
825827
if (opt_rebase < 0)
826828
opt_rebase = config_get_rebase();
827829

828-
git_config(git_pull_config, NULL);
829-
830830
if (read_cache_unmerged())
831831
die_resolve_conflict("pull");
832832

0 commit comments

Comments
 (0)