Skip to content

Commit 98bf667

Browse files
stefanbellergitster
authored andcommitted
submodule update: add regression test with old style setups
As f178c13 (Revert "Merge branch 'sb/submodule-core-worktree'", 2018-09-07) was produced shortly before a release, nobody asked for a regression test to be included. Add a regression test that makes sure that the invocation of `git submodule update` on old setups doesn't produce errors as pointed out in f178c13. The place to add such a regression test may look odd in t7412, but that is the best place as there we setup old style submodule setups explicitly. Signed-off-by: Stefan Beller <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent b21ebb6 commit 98bf667

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

t/t7412-submodule-absorbgitdirs.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,12 @@ test_expect_success 're-setup nested submodule' '
7575
GIT_WORK_TREE=../../../nested git -C sub1/.git/modules/nested config \
7676
core.worktree "../../../nested" &&
7777
# make sure this re-setup is correct
78-
git status --ignore-submodules=none
78+
git status --ignore-submodules=none &&
79+
80+
# also make sure this old setup does not regress
81+
git submodule update --init --recursive >out 2>err &&
82+
test_must_be_empty out &&
83+
test_must_be_empty err
7984
'
8085

8186
test_expect_success 'absorb the git dir in a nested submodule' '

0 commit comments

Comments
 (0)