diff options
author | Brandon Williams <bmwill@google.com> | 2017-08-02 12:49:19 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-08-02 14:26:46 -0700 |
commit | 8fa2915971e5032e6a32f5096452db81ab8795eb (patch) | |
tree | 8c2435d5baec8d1ea4050dddef472ad1414a98c3 /builtin/fetch.c | |
parent | submodule: remove submodule.fetchjobs from submodule-config parsing (diff) | |
download | tgif-8fa2915971e5032e6a32f5096452db81ab8795eb.tar.xz |
submodule: remove fetch.recursesubmodules from submodule-config parsing
Remove the 'fetch.recursesubmodules' configuration option from the
general submodule-config parsing and instead rely on using
'config_from_gitmodules()' in order to maintain backwards compatibility
with this config being placed in the '.gitmodules' file.
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/fetch.c')
-rw-r--r-- | builtin/fetch.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/builtin/fetch.c b/builtin/fetch.c index ade092bf8d..d84c26391c 100644 --- a/builtin/fetch.c +++ b/builtin/fetch.c @@ -71,6 +71,9 @@ static int git_fetch_config(const char *k, const char *v, void *cb) if (!strcmp(k, "submodule.fetchjobs")) { max_children = parse_submodule_fetchjobs(k, v); return 0; + } else if (!strcmp(k, "fetch.recursesubmodules")) { + recurse_submodules = parse_fetch_recurse_submodules_arg(k, v); + return 0; } return git_default_config(k, v, cb); @@ -81,6 +84,9 @@ static int gitmodules_fetch_config(const char *var, const char *value, void *cb) if (!strcmp(var, "submodule.fetchjobs")) { max_children = parse_submodule_fetchjobs(var, value); return 0; + } else if (!strcmp(var, "fetch.recursesubmodules")) { + recurse_submodules = parse_fetch_recurse_submodules_arg(var, value); + return 0; } return 0; @@ -1355,7 +1361,6 @@ int cmd_fetch(int argc, const char **argv, const char *prefix) deepen = 1; if (recurse_submodules != RECURSE_SUBMODULES_OFF) { - set_config_fetch_recurse_submodules(recurse_submodules_default); gitmodules_config(); git_config(submodule_config, NULL); } @@ -1399,6 +1404,7 @@ int cmd_fetch(int argc, const char **argv, const char *prefix) result = fetch_populated_submodules(&options, submodule_prefix, recurse_submodules, + recurse_submodules_default, verbosity < 0, max_children); argv_array_clear(&options); |