summaryrefslogtreecommitdiff
path: root/t/t5302-pack-index.sh
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2011-06-03 15:32:17 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2011-06-05 22:45:38 -0700
commit3de89c9d4216d0fdc11bd1141c419ac4d0d35fed (patch)
tree218f4d8958273c4685df94b1772ad9de4ed30b22 /t/t5302-pack-index.sh
parentindex-pack: show histogram when emulating "verify-pack -v" (diff)
downloadtgif-3de89c9d4216d0fdc11bd1141c419ac4d0d35fed.tar.xz
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 <gitster@pobox.com>
Diffstat (limited to 't/t5302-pack-index.sh')
-rwxr-xr-xt/t5302-pack-index.sh5
1 files changed, 2 insertions, 3 deletions
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 <obj-list ) &&
- err=$(test_must_fail git verify-pack \
- ".git/objects/pack/pack-${pack1}.pack" 2>&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/* &&