diff options
Diffstat (limited to 't/t1050-large.sh')
-rwxr-xr-x | t/t1050-large.sh | 34 |
1 files changed, 12 insertions, 22 deletions
diff --git a/t/t1050-large.sh b/t/t1050-large.sh index 6bc1d76fb1..4f3aa17c99 100755 --- a/t/t1050-large.sh +++ b/t/t1050-large.sh @@ -51,42 +51,32 @@ EOF test_expect_success 'add a large file or two' ' git add large1 huge large2 && # make sure we got a single packfile and no loose objects - bad= count=0 idx= && + count=0 idx= && for p in .git/objects/pack/pack-*.pack do - count=$(( $count + 1 )) - if test_path_is_file "$p" && - idx=${p%.pack}.idx && test_path_is_file "$idx" - then - continue - fi - bad=t + count=$(( $count + 1 )) && + test_path_is_file "$p" && + idx=${p%.pack}.idx && + test_path_is_file "$idx" || return 1 done && - test -z "$bad" && test $count = 1 && cnt=$(git show-index <"$idx" | wc -l) && test $cnt = 2 && for l in .git/objects/$OIDPATH_REGEX do - test_path_is_file "$l" || continue - bad=t + test_path_is_missing "$l" || return 1 done && - test -z "$bad" && # attempt to add another copy of the same git add large3 && bad= count=0 && for p in .git/objects/pack/pack-*.pack do - count=$(( $count + 1 )) - if test_path_is_file "$p" && - idx=${p%.pack}.idx && test_path_is_file "$idx" - then - continue - fi - bad=t + count=$(( $count + 1 )) && + test_path_is_file "$p" && + idx=${p%.pack}.idx && + test_path_is_file "$idx" || return 1 done && - test -z "$bad" && test $count = 1 ' @@ -115,7 +105,7 @@ test_expect_success 'packsize limit' ' count=0 && for pi in .git/objects/pack/pack-*.idx do - test_path_is_file "$pi" && count=$(( $count + 1 )) + test_path_is_file "$pi" && count=$(( $count + 1 )) || return 1 done && test $count = 2 && @@ -128,7 +118,7 @@ test_expect_success 'packsize limit' ' for pi in .git/objects/pack/pack-*.idx do - git show-index <"$pi" + git show-index <"$pi" || return 1 done | sed -e "s/^[0-9]* \([0-9a-f]*\) .*/\1/" | sort >actual && |