Skip to content

Commit 9288bed

Browse files
raalkmlgitster
authored andcommitted
Make t5710 more strict when creating nested repos
The test 'creating too deep nesting' can fail even when cloning the repos, but is not its main purpose (it has to prepare nested repos and ensure the last one is invalid). So split the test into the creation and invalidity checking parts. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 97394ee commit 9288bed

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

t/t5710-info-alternate.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,18 @@ git prune'
5353

5454
cd "$base_dir"
5555

56-
test_expect_failure 'creating too deep nesting' \
56+
test_expect_success 'creating too deep nesting' \
5757
'git clone -l -s C D &&
5858
git clone -l -s D E &&
5959
git clone -l -s E F &&
6060
git clone -l -s F G &&
61-
git clone -l -s G H &&
62-
cd H &&
63-
test_valid_repo'
61+
git clone -l -s G H'
62+
63+
test_expect_success 'invalidity of deepest repository' \
64+
'cd H && {
65+
test_valid_repo
66+
test $? -ne 0
67+
}'
6468

6569
cd "$base_dir"
6670

0 commit comments

Comments
 (0)