]> git.ipfire.org Git - thirdparty/git.git/commit
pack-bitmap.c: harden 'test_bitmap_walk()' to check type bitmaps
authorTaylor Blau <me@ttaylorr.com>
Tue, 24 Aug 2021 16:15:51 +0000 (12:15 -0400)
committerJunio C Hamano <gitster@pobox.com>
Tue, 24 Aug 2021 20:21:13 +0000 (13:21 -0700)
commitfa95666a403e5dda4c2c14ac168b5c3389126e6c
tree4fb2e5f34e5f5e1d4e423ce223a39136da919ac0
parent225bc32a989d7a22fa6addafd4ce7dcd04675dbf
pack-bitmap.c: harden 'test_bitmap_walk()' to check type bitmaps

The special `--test-bitmap` mode of `git rev-list` is used to compare
the result of an object traversal with a bitmap to check its integrity.
This mode does not, however, assert that the types of reachable objects
are stored correctly.

Harden this mode by teaching it to also check that each time an object's
bit is marked, the corresponding bit should be set in exactly one of the
type bitmaps (whose type matches the object's true type).

Co-authored-by: Jeff King <peff@peff.net>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
pack-bitmap.c