Merge branch 'sg/t5310-empty-input-fix'
authorJunio C Hamano <gitster@pobox.com>
Mon, 20 Aug 2018 18:33:52 +0000 (11:33 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 20 Aug 2018 18:33:52 +0000 (11:33 -0700)
Test fix.

* sg/t5310-empty-input-fix:
t5310-pack-bitmaps: fix bogus 'pack-objects to file can use bitmap' test

1  2 
t/t5310-pack-bitmaps.sh
diff --combined t/t5310-pack-bitmaps.sh
index 6ee4d3f2d91f435ad29010b16523ea4417dc625d,a8f530676cb691b5774e82c6b17e0741ac4c5d35..557bd0d0c09e370515acb7fc75391f0a7d62d73e
@@@ -9,7 -9,8 +9,8 @@@ objpath () 
  
  # show objects present in pack ($1 should be associated *.idx)
  list_packed_objects () {
-       git show-index <"$1" | cut -d' ' -f2
+       git show-index <"$1" >object-list &&
+       cut -d' ' -f2 object-list
  }
  
  # has_any pattern-file content-file
@@@ -204,8 -205,8 +205,8 @@@ test_expect_success 'pack-objects to fi
        # verify equivalent packs are generated with/without using bitmap index
        packasha1=$(git pack-objects --no-use-bitmap-index --all packa </dev/null) &&
        packbsha1=$(git pack-objects --use-bitmap-index --all packb </dev/null) &&
-       list_packed_objects <packa-$packasha1.idx >packa.objects &&
-       list_packed_objects <packb-$packbsha1.idx >packb.objects &&
+       list_packed_objects packa-$packasha1.idx >packa.objects &&
+       list_packed_objects packb-$packbsha1.idx >packb.objects &&
        test_cmp packa.objects packb.objects
  '
  
@@@ -309,8 -310,9 +310,8 @@@ test_expect_success 'pack reuse respect
        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' '
        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' '