]> git.ipfire.org Git - thirdparty/git.git/commit
fsck: create scaffolding for rev-index checks
authorDerrick Stolee <derrickstolee@github.com>
Mon, 17 Apr 2023 16:21:38 +0000 (16:21 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 17 Apr 2023 21:39:04 +0000 (14:39 -0700)
commit0d30feef3c55f63f8db1dc1e52071090d16dfaaf
treee5420913efcb4b5b70d9332b3923804601b55927
parent3c63503759136836dee84ea28835b1b4ef8882bf
fsck: create scaffolding for rev-index checks

The 'fsck' builtin checks many of Git's on-disk data structures, but
does not currently validate the pack rev-index files (a .rev file to
pair with a .pack and .idx file).

Before doing a more-involved check process, create the scaffolding
within builtin/fsck.c to have a new error type and add that error type
when the API method verify_pack_revindex() returns an error. That method
does nothing currently, but we will add checks to it in later changes.

For now, check that 'git fsck' succeeds without any errors in the normal
case. Future checks will be paired with tests that corrupt the .rev file
appropriately.

Signed-off-by: Derrick Stolee <derrickstolee@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/fsck.c
pack-revindex.c
pack-revindex.h
t/t5325-reverse-index.sh