mirror of
https://github.com/git/git.git
synced 2024-11-30 21:44:02 +08:00
builtin/fetch cleanup: always set default value for submodule recursing
The check for the default was introduced with88a21979c5
(fetch/pull: recurse into submodules when necessary, 2011-03-06), which replaced an older construct (builtin/fetchs own implementation of the super-prefix) introduced inbe254a0ea9
(Add the 'fetch.recurseSubmodules' config setting, 2010-11-11) which made sense at the time as there was no default fetch option for submodules at the time. Set builtin/fetch.c#recurse_submodules_default to the same value as submodule.c#config_fetch_recurse_submodules which is set via set_config_fetch_recurse_submodules, such that the condition for checking whether we have to set the default value becomes unnecessary. Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
a6d7eb2c7a
commit
e8906a9019
@ -49,7 +49,7 @@ static struct transport *gtransport;
|
||||
static struct transport *gsecondary;
|
||||
static const char *submodule_prefix = "";
|
||||
static int recurse_submodules = RECURSE_SUBMODULES_DEFAULT;
|
||||
static int recurse_submodules_default = RECURSE_SUBMODULES_DEFAULT;
|
||||
static int recurse_submodules_default = RECURSE_SUBMODULES_ON_DEMAND;
|
||||
static int shown_url = 0;
|
||||
static int refmap_alloc, refmap_nr;
|
||||
static const char **refmap_array;
|
||||
@ -1336,7 +1336,6 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)
|
||||
deepen = 1;
|
||||
|
||||
if (recurse_submodules != RECURSE_SUBMODULES_OFF) {
|
||||
if (recurse_submodules_default != RECURSE_SUBMODULES_DEFAULT)
|
||||
set_config_fetch_recurse_submodules(recurse_submodules_default);
|
||||
gitmodules_config();
|
||||
git_config(submodule_config, NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user