]> git.ipfire.org Git - thirdparty/git.git/commit
pack-bitmap: add load corrupt bitmap test
authorLidong Yan <502024330056@smail.nju.edu.cn>
Tue, 1 Jul 2025 05:32:09 +0000 (05:32 +0000)
committerJunio C Hamano <gitster@pobox.com>
Tue, 1 Jul 2025 21:41:54 +0000 (14:41 -0700)
commitbfd5522e98cead32d7bbdf54eca4ffeb3e01fa6b
treeb9da4c53ebbbd88ff78112aed0ff78f1a19ee97d
parent73bf771b958b0d28fc5839cd94c4b7ad2029f631
pack-bitmap: add load corrupt bitmap test

t5310 lacks a test to ensure git works correctly when commit bitmap
data is corrupted. So this patch add test helper in pack-bitmap.c to
list each commit bitmap position in bitmap file and `load corrupt bitmap`
test case in t/t5310 to corrupt a commit bitmap before loading it.

Signed-off-by: Lidong Yan <502024330056@smail.nju.edu.cn>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
pack-bitmap.c
pack-bitmap.h
t/helper/test-bitmap.c
t/t5310-pack-bitmaps.sh