diff options
author | Eric Wong <e@80x24.org> | 2023-03-08 23:22:05 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-03-09 20:06:39 +0100 |
commit | 15184ae9da1474908060a5c9b8c6ca88891e415e (patch) | |
tree | ed5699de830884c6b94c0286b23bf28447c664d2 /t/t5526-fetch-submodules.sh | |
parent | Git 2.40-rc2 (diff) | |
download | git-15184ae9da1474908060a5c9b8c6ca88891e415e.tar.xz git-15184ae9da1474908060a5c9b8c6ca88891e415e.zip |
fetch: pass --no-write-fetch-head to subprocesses
It seems a user would expect this option would work regardless
of whether it's fetching from a single remote, many remotes,
or recursing into submodules.
Signed-off-by: Eric Wong <e@80x24.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to '')
-rwxr-xr-x | t/t5526-fetch-submodules.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/t/t5526-fetch-submodules.sh b/t/t5526-fetch-submodules.sh index b9546ef8e5..dcdbe26a08 100755 --- a/t/t5526-fetch-submodules.sh +++ b/t/t5526-fetch-submodules.sh @@ -167,6 +167,19 @@ test_expect_success "fetch --recurse-submodules recurses into submodules" ' verify_fetch_result actual.err ' +test_expect_success "fetch --recurse-submodules honors --no-write-fetch-head" ' + ( + cd downstream && + git submodule foreach --recursive \ + sh -c "cd \"\$(git rev-parse --git-dir)\" && rm -f FETCH_HEAD" && + + git fetch --recurse-submodules --no-write-fetch-head && + + git submodule foreach --recursive \ + sh -c "cd \"\$(git rev-parse --git-dir)\" && ! test -f FETCH_HEAD" + ) +' + test_expect_success "submodule.recurse option triggers recursive fetch" ' add_submodule_commits && ( |