From 3de89c9d4216d0fdc11bd1141c419ac4d0d35fed Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Fri, 3 Jun 2011 15:32:17 -0700 Subject: verify-pack: use index-pack --verify This finally gets rid of the inefficient verify-pack implementation that walks objects in the packfile in their object name order and replaces it with a call to index-pack --verify. As a side effect, it also removes packed_object_info_detail() API which is rather expensive. As this changes the way errors are reported (verify-pack used to rely on the usual runtime error detection routine unpack_entry() to diagnose the CRC errors in an entry in the *.idx file; index-pack --verify checks the whole *.idx file in one go), update a test that expected the string "CRC" to appear in the error message. Signed-off-by: Junio C Hamano --- t/t5302-pack-index.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 't') diff --git a/t/t5302-pack-index.sh b/t/t5302-pack-index.sh index 76bcaca988..f8fa92446c 100755 --- a/t/t5302-pack-index.sh +++ b/t/t5302-pack-index.sh @@ -226,9 +226,8 @@ test_expect_success \ ( while read obj do git cat-file -p $obj >/dev/null || exit 1 done &1) && - echo "$err" | grep "CRC mismatch"' + test_must_fail git verify-pack ".git/objects/pack/pack-${pack1}.pack" +' test_expect_success 'running index-pack in the object store' ' rm -f .git/objects/pack/* && -- cgit v1.2.3