rev-list: die when --test-bitmap detects a mismatch

You can use "git rev-list --test-bitmap HEAD" to check that bitmaps produce the same answer we'd get from a regular traversal. But if we detect an error, we only print "mismatch", and still exit with a successful error code. That makes the uses of --test-bitmap in the test suite (e.g., in t5310) mostly pointless: even if we saw an error, the tests wouldn't notice. Let's instead call die(), which will let these tests work as designed, and alert us if the bitmaps are bogus. 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>

Jeff King committed Dec 8, 2020 at 17:03 UTC 2978b00691c1246149892882265cd62a6921cbf5
1 file changed +1 -1
pack-bitmap.c
+1 -1
@@ -1328,7 +1328,7 @@ void test_bitmap_walk(struct rev_info *revs)
1328 if (bitmap_equals(result, tdata.base))
1329 fprintf(stderr, "OK!\n");
1330 else
1331 - fprintf(stderr, "Mismatch!\n");
1331 + die("mismatch in bitmap results");
1332
1333 free_bitmap_index(bitmap_git);
1334 }