Skip to content

Commit f38c924

Browse files
xypiiegitster
authored andcommitted
t7400: testcase for submodule status on unregistered inner git repos
We have test coverage for "git submodule status" output in various cases, i.e. 1) not-init, not-cloned: status should initially be "missing" 2) init, not-cloned: status should be "missing" 3) not-init, cloned: status should ignore the inner git-repo 4) init, cloned: status should be "up-to-date" after update 4.1) + modified: status should be "modified" after submodule commit 4.2) + modified, committed: status should be "up-to-date" after update the case 3) is not covered yet. Test that submodule status reports an inner git repo as unknown, while it is not added to the superproject. This covers case (3). Signed-off-by: Peter Kaestle <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3b2885e commit f38c924

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

t/t7400-submodule-basic.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,21 @@ test_expect_success 'add aborts on repository with no commits' '
5555
test_i18ncmp expect actual
5656
'
5757

58+
test_expect_success 'status should ignore inner git repo when not added' '
59+
rm -fr inner &&
60+
mkdir inner &&
61+
(
62+
cd inner &&
63+
git init &&
64+
>t &&
65+
git add t &&
66+
git commit -m "initial"
67+
) &&
68+
test_must_fail git submodule status inner 2>output.err &&
69+
rm -fr inner &&
70+
test_i18ngrep "^error: .*did not match any file(s) known to git" output.err
71+
'
72+
5873
test_expect_success 'setup - repository in init subdirectory' '
5974
mkdir init &&
6075
(

0 commit comments

Comments
 (0)