Skip to content

Commit 80938c3

Browse files
avargitster
authored andcommitted
pack-objects test: modernize style
Modernize the quoting and indentation style of two tests added in 8685da4 ("don't ever allow SHA1 collisions to exist by fetching a pack", 2007-03-20), and of a subsequent one added in 4614043 ("index-pack: use streaming interface for collision test on large blobs", 2012-05-24) which had copied the style of the first two. Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent cae598d commit 80938c3

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

t/t5300-pack-object.sh

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -475,22 +475,22 @@ test_expect_success 'pack-objects in too-many-packs mode' '
475475
# two tests at the end of this file.
476476
#
477477

478-
test_expect_success \
479-
'fake a SHA1 hash collision' \
480-
'long_a=$(git hash-object a | sed -e "s!^..!&/!") &&
481-
long_b=$(git hash-object b | sed -e "s!^..!&/!") &&
482-
test -f .git/objects/$long_b &&
483-
cp -f .git/objects/$long_a \
484-
.git/objects/$long_b'
478+
test_expect_success 'fake a SHA1 hash collision' '
479+
long_a=$(git hash-object a | sed -e "s!^..!&/!") &&
480+
long_b=$(git hash-object b | sed -e "s!^..!&/!") &&
481+
test -f .git/objects/$long_b &&
482+
cp -f .git/objects/$long_a \
483+
.git/objects/$long_b
484+
'
485485

486-
test_expect_success \
487-
'make sure index-pack detects the SHA1 collision' \
488-
'test_must_fail git index-pack -o bad.idx test-3.pack 2>msg &&
489-
test_i18ngrep "SHA1 COLLISION FOUND" msg'
486+
test_expect_success 'make sure index-pack detects the SHA1 collision' '
487+
test_must_fail git index-pack -o bad.idx test-3.pack 2>msg &&
488+
test_i18ngrep "SHA1 COLLISION FOUND" msg
489+
'
490490

491-
test_expect_success \
492-
'make sure index-pack detects the SHA1 collision (large blobs)' \
493-
'test_must_fail git -c core.bigfilethreshold=1 index-pack -o bad.idx test-3.pack 2>msg &&
494-
test_i18ngrep "SHA1 COLLISION FOUND" msg'
491+
test_expect_success 'make sure index-pack detects the SHA1 collision (large blobs)' '
492+
test_must_fail git -c core.bigfilethreshold=1 index-pack -o bad.idx test-3.pack 2>msg &&
493+
test_i18ngrep "SHA1 COLLISION FOUND" msg
494+
'
495495

496496
test_done

0 commit comments

Comments
 (0)