git/odb
Patrick Steinhardt 426d291b60 builtin/fsck: move reverse index verification into the packed source
The checks for reverse indexes live in `check_pack_rev_indexes()`, which
is hosted in "builtin/fsck.c". These checks are obviously specific to
the "packed" backend.

Move the logic into `odb_source_packed_fsck()`. As in the preceding
commit, drop the dedicated `ERROR_PACK_REV_INDEX` bit and instead use
the generic `ERROR_OBJECT` bit.

Note that this changes behaviour in two ways:

  - The checks are now skipped when "--connectivity-only" was passed.
    This is because we don't even run `odb_fsck()` at all when that
    flag has been passed by the user, and not verifying data structures
    of the object database matches the documented intent of that flag,
    which is to only check the connectivity of reachable objects.

  - The checks are now skipped for non-local sources when "--no-full"
    was passed. This is, again, in line with the documented intent of
    that flag.

Add a test to cast these semantics into stone.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-09-11 09:14:44 -07:00
..
source-files.c odb: provide infrastructure for pluggable fsck checks 2026-09-11 09:14:44 -07:00
source-files.h Merge branch 'ps/odb-make-creation-pluggable' 2026-08-20 07:30:52 -07:00
source-inmemory.c odb: provide infrastructure for pluggable fsck checks 2026-09-11 09:14:44 -07:00
source-inmemory.h odb/source: introduce function to map source type to name 2026-08-06 21:24:25 -07:00
source-loose.c odb: provide infrastructure for pluggable fsck checks 2026-09-11 09:14:44 -07:00
source-loose.h odb/source: introduce function to map source type to name 2026-08-06 21:24:25 -07:00
source-packed.c builtin/fsck: move reverse index verification into the packed source 2026-09-11 09:14:44 -07:00
source-packed.h odb/source: introduce function to map source type to name 2026-08-06 21:24:25 -07:00
source.c odb/source: introduce function to map source type to name 2026-08-06 21:24:25 -07:00
source.h odb: provide infrastructure for pluggable fsck checks 2026-09-11 09:14:44 -07:00
streaming.c Merge branch 'ps/odb-eagerly-load-alternates' into ps/odb-pluggable-fsck 2026-08-25 18:07:31 -07:00
streaming.h odb/streaming: unify function names to create new streams 2026-08-05 09:42:50 -07:00
transaction.c odb/streaming: consolidate read and write streams 2026-08-05 09:42:50 -07:00
transaction.h odb/streaming: consolidate read and write streams 2026-08-05 09:42:50 -07:00