pull: honor submodule.recurse config option
"git pull" supports a --recurse-submodules option but does not parse the submodule.recurse configuration item to set the default for that option. Meanwhile "git fetch" does support submodule.recurse, producing confusing behavior: when submodule.recurse is enabled, "git pull" recursively fetches submodules but does not update them after fetch. Handle submodule.recurse in "git pull" to fix this. Reported-by: Magnus Homann <magnus@homann.se> Signed-off-by: Nicolas Morey-Chaisemartin <nicolas@morey-chaisemartin.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
cad0c6928e
commit
121e43fa53
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user