]> git.ipfire.org Git - thirdparty/git.git/commit - midx.c
multi-pack-index: verify object offsets
authorDerrick Stolee <dstolee@microsoft.com>
Thu, 13 Sep 2018 18:02:25 +0000 (11:02 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 17 Sep 2018 20:49:41 +0000 (13:49 -0700)
commitcc6af73c029da23f7b2c98c60e4fba1ca2db215b
treeaf566e0acf04339045aa56a41a1cf3e2e67e04f8
parentd8ac9ee109ade79783ea398200219960d352f503
multi-pack-index: verify object offsets

The 'git multi-pack-index verify' command must verify the object
offsets stored in the multi-pack-index are correct. There are two
ways the offset chunk can be incorrect: the pack-int-id and the
object offset.

Replace the BUG() statement with a die() statement, now that we
may hit a bad pack-int-id during a 'verify' command on a corrupt
multi-pack-index, and it is covered by a test.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
midx.c
t/t5319-multi-pack-index.sh