config: teach the fetch.recurseSubmodules option the 'on-demand' value

To enable the user to change the default behavior of "git fetch" and "git
pull" regarding submodule recursion add the new "on-demand" value which
has just been added to the "--recurse-submodules" command line option.

Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jens Lehmann
2011-03-06 23:11:48 +01:00
committed by Junio C Hamano
parent 8f0700dd33
commit 1fb2550202
3 changed files with 36 additions and 4 deletions

View File

@ -71,7 +71,7 @@ int submodule_config(const char *var, const char *value, void *cb)
if (!prefixcmp(var, "submodule."))
return parse_submodule_config_option(var, value);
else if (!strcmp(var, "fetch.recursesubmodules")) {
config_fetch_recurse_submodules = git_config_bool(var, value);
config_fetch_recurse_submodules = parse_fetch_recurse_submodules_arg(var, value);
return 0;
}
return 0;