diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-09-19 10:47:55 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-09-19 10:47:55 +0900 |
commit | df80c5760c947f2013df86f52d0a5103d07958a2 (patch) | |
tree | 9cde7e61d93b700e2f6cc000f59321c597675778 /builtin/pull.c | |
parent | Merge branch 'mh/packed-ref-store-prep' (diff) | |
parent | pull: honor submodule.recurse config option (diff) | |
download | tgif-df80c5760c947f2013df86f52d0a5103d07958a2.tar.xz |
Merge branch 'nm/pull-submodule-recurse-config'
"git -c submodule.recurse=yes pull" did not work as if the
"--recurse-submodules" option was given from the command line.
This has been corrected.
* nm/pull-submodule-recurse-config:
pull: honor submodule.recurse config option
pull: fix cli and config option parsing order
Diffstat (limited to 'builtin/pull.c')
-rw-r--r-- | builtin/pull.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/builtin/pull.c b/builtin/pull.c index 7fe281414e..6f772e8a22 100644 --- a/builtin/pull.c +++ b/builtin/pull.c @@ -325,6 +325,10 @@ static int git_pull_config(const char *var, const char *value, void *cb) if (!strcmp(var, "rebase.autostash")) { config_autostash = git_config_bool(var, value); return 0; + } else if (!strcmp(var, "submodule.recurse")) { + recurse_submodules = git_config_bool(var, value) ? + RECURSE_SUBMODULES_ON : RECURSE_SUBMODULES_OFF; + return 0; } return git_default_config(var, value, cb); } @@ -815,6 +819,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 +831,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"); |