revision.c: reduce implicit dependency the_repository
[gitweb.git] / t / t5310-pack-bitmaps.sh
index a8f530676cb691b5774e82c6b17e0741ac4c5d35..7bff7923f2a91165b5a0b5251351798519d63270 100755 (executable)
@@ -310,9 +310,8 @@ test_expect_success 'pack reuse respects --honor-pack-keep' '
        done &&
        reusable_pack --honor-pack-keep >empty.pack &&
        git index-pack empty.pack &&
-       >expect &&
        git show-index <empty.idx >actual &&
-       test_cmp expect actual
+       test_must_be_empty actual
 '
 
 test_expect_success 'pack reuse respects --local' '
@@ -320,17 +319,15 @@ test_expect_success 'pack reuse respects --local' '
        test_when_finished "mv alt.git/objects/pack/* .git/objects/pack/" &&
        reusable_pack --local >empty.pack &&
        git index-pack empty.pack &&
-       >expect &&
        git show-index <empty.idx >actual &&
-       test_cmp expect actual
+       test_must_be_empty actual
 '
 
 test_expect_success 'pack reuse respects --incremental' '
        reusable_pack --incremental >empty.pack &&
        git index-pack empty.pack &&
-       >expect &&
        git show-index <empty.idx >actual &&
-       test_cmp expect actual
+       test_must_be_empty actual
 '
 
 test_expect_success 'truncated bitmap fails gracefully' '
@@ -338,7 +335,7 @@ test_expect_success 'truncated bitmap fails gracefully' '
        git rev-list --use-bitmap-index --count --all >expect &&
        bitmap=$(ls .git/objects/pack/*.bitmap) &&
        test_when_finished "rm -f $bitmap" &&
-       head -c 512 <$bitmap >$bitmap.tmp &&
+       test_copy_bytes 512 <$bitmap >$bitmap.tmp &&
        mv -f $bitmap.tmp $bitmap &&
        git rev-list --use-bitmap-index --count --all >actual 2>stderr &&
        test_cmp expect actual &&