Skip to content

Commit 2978b00

Browse files
peffgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Taylor Blau <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent c5cd749 commit 2978b00

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pack-bitmap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1328,7 +1328,7 @@ void test_bitmap_walk(struct rev_info *revs)
13281328
if (bitmap_equals(result, tdata.base))
13291329
fprintf(stderr, "OK!\n");
13301330
else
1331-
fprintf(stderr, "Mismatch!\n");
1331+
die("mismatch in bitmap results");
13321332

13331333
free_bitmap_index(bitmap_git);
13341334
}

0 commit comments

Comments
 (0)