[PATCH 00/14] fsck: drop use of `the_repository`
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Mar 20, 2026, 11:47 UTC
- Message-ID
- <20260320-b4-pks-fsck-without-the-repository-v1-0-6594f997926b@pks.im>
Hi,
this patch series refactors "{builtin/,}fsck.c" to not depend on `the_repository` anymore. These refactorings are mostly done to prepare for upcoming changes where we'll make backend-specific fsck checks pluggable.
Thanks!
Patrick
---
Patrick Steinhardt (14):
fsck: drop `the_repository` in `fsck_walk()`
fsck: drop `the_repository` in `fsck_finish()`
fsck: refactor interface to parse fsck options
fsck: drop `the_repository` in `fsck_set_msg_types()`
fsck: stop relying on global state via `parse_oid_hex()`
builtin/fsck: fix trivial dependence on `the_repository`
builtin/fsck: stop using `the_repository` when snapshotting refs
builtin/fsck: stop using `the_repository` when checking refs
builtin/fsck: stop using `the_repository` when checking reflogs
builtin/fsck: stop using `the_repository` with loose objects
builtin/fsck: stop using `the_repository` when checking packed objects
builtin/fsck: stop using `the_repository` when marking objects
fsck: provide repository in `struct fsck_report_object`
builtin/fsck: stop using `the_repository` in error reportingbuiltin/fsck.c | 299 ++++++++++++++++------------- builtin/index-pack.c | 15 +- builtin/mktag.c | 7 +- builtin/refs.c | 2 +- builtin/unpack-objects.c | 9 +- fetch-pack.c | 4 +- fsck.c | 485 ++++++++++++++++++++++++++++------------------- fsck.h | 41 ++-- object-file.c | 5 +- pack-check.c | 7 +- pack.h | 9 +- 11 files changed, 520 insertions(+), 363 deletions(-)
--- base-commit: 7ff1e8dc1e1680510c96e69965b3fa81372c5037 change-id: 20260320-b4-pks-fsck-without-the-repository-4ddc4c8ed61e