Skip to content

Commit

Permalink
Make t5710 more strict when creating nested repos
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alex Riesen authored and Junio C Hamano committed Jan 22, 2008
1 parent 97394ee commit 9288bed
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions t/t5710-info-alternate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,18 @@ git prune'

cd "$base_dir"

test_expect_failure 'creating too deep nesting' \
test_expect_success 'creating too deep nesting' \
'git clone -l -s C D &&
git clone -l -s D E &&
git clone -l -s E F &&
git clone -l -s F G &&
git clone -l -s G H &&
cd H &&
test_valid_repo'
git clone -l -s G H'

test_expect_success 'invalidity of deepest repository' \
'cd H && {
test_valid_repo
test $? -ne 0
}'

cd "$base_dir"

Expand Down

0 comments on commit 9288bed

Please sign in to comment.