X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=t%2Ft5510-fetch.sh;h=6508d8ab133f21b8deae078b3fd1eb15924c7c6d;hb=61821aaa12ed698f2e94bb15fea958c598e4f231;hp=e0af4c4e62c40a563f692361944cc58e2c8e38e2;hpb=8a557bb77fc009b00f7952f0d3d6ebd33079f70e;p=git.git diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh index e0af4c4e6..6508d8ab1 100755 --- a/t/t5510-fetch.sh +++ b/t/t5510-fetch.sh @@ -14,6 +14,14 @@ test_bundle_object_count () { test "$2" = $(grep '^[0-9a-f]\{40\} ' verify.out | wc -l) } +convert_bundle_to_pack () { + while read x && test -n "$x" + do + :; + done + cat +} + test_expect_success setup ' echo >file original && git add file && @@ -207,13 +215,7 @@ test_expect_success 'unbundle 1' ' test_expect_success 'bundle 1 has only 3 files ' ' cd "$D" && - ( - while read x && test -n "$x" - do - :; - done - cat - ) bundle.pack && + convert_bundle_to_pack bundle.pack && git index-pack bundle.pack && test_bundle_object_count bundle.pack 3 ' @@ -230,13 +232,7 @@ test_expect_success 'bundle does not prerequisite objects' ' git add file2 && git commit -m add.file2 file2 && git bundle create bundle3 -1 HEAD && - ( - while read x && test -n "$x" - do - :; - done - cat - ) bundle.pack && + convert_bundle_to_pack bundle.pack && git index-pack bundle.pack && test_bundle_object_count bundle.pack 3 '