Signed-off-by: Stefan Beller <sbeller@xxxxxxxxxx> --- submodule.c | 1 + t/t5526-fetch-submodules.sh | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/submodule.c b/submodule.c index 5d7aa711c8..0bf268b196 100644 --- a/submodule.c +++ b/submodule.c @@ -94,6 +94,7 @@ static int submodule_config(const char *var, const char *value, void *cb) if (!strcmp(var, "submodule.recurse")) { int v = git_config_bool(var, value) ? RECURSE_SUBMODULES_ON : RECURSE_SUBMODULES_OFF; + config_fetch_recurse_submodules = v; config_update_recurse_submodules = v; } else if (!strcmp(var, "submodule.fetchjobs")) { submodule_config_reading = SUBMODULE_CONFIG_EXISTS; diff --git a/t/t5526-fetch-submodules.sh b/t/t5526-fetch-submodules.sh index f3b0a8d30a..162baf101f 100755 --- a/t/t5526-fetch-submodules.sh +++ b/t/t5526-fetch-submodules.sh @@ -71,6 +71,16 @@ test_expect_success "fetch --recurse-submodules recurses into submodules" ' test_i18ncmp expect.err actual.err ' +test_expect_success "submodule.recurse option triggers recursive fetch" ' + add_upstream_commit && + ( + cd downstream && + git -c submodule.recurse fetch >../actual.out 2>../actual.err + ) && + test_must_be_empty actual.out && + test_i18ncmp expect.err actual.err +' + test_expect_success "fetch --recurse-submodules -j2 has the same output behaviour" ' add_upstream_commit && ( -- 2.13.0.18.g7d86cc8ba0