git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[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 reporting
 builtin/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

Next: Patrick Steinhardt
Message 1 of 18 in “fsck: drop use of `the_repository`”
  1. 00/14 fsck: drop use of `the_repository`Patrick Steinhardt, Mar 20, 2026
  2. 01/14 fsck: drop `the_repository` in `fsck_walk()`Patrick Steinhardt, Mar 20, 2026
  3. Junio C HamanoMar 20, 2026
  4. Patrick SteinhardtMar 23, 2026
  5. 02/14 fsck: drop `the_repository` in `fsck_finish()`Patrick Steinhardt, Mar 20, 2026
  6. 03/14 fsck: refactor interface to parse fsck optionsPatrick Steinhardt, Mar 20, 2026
  7. 04/14 fsck: drop `the_repository` in `fsck_set_msg_types()`Patrick Steinhardt, Mar 20, 2026
  8. 05/14 fsck: stop relying on global state via `parse_oid_hex()`Patrick Steinhardt, Mar 20, 2026
  9. 06/14 builtin/fsck: fix trivial dependence on `the_repository`Patrick Steinhardt, Mar 20, 2026
  10. 07/14 builtin/fsck: stop using `the_repository` when snapshotting refsPatrick Steinhardt, Mar 20, 2026
  11. 08/14 builtin/fsck: stop using `the_repository` when checking refsPatrick Steinhardt, Mar 20, 2026
  12. 09/14 builtin/fsck: stop using `the_repository` when checking reflogsPatrick Steinhardt, Mar 20, 2026
  13. 10/14 builtin/fsck: stop using `the_repository` with loose objectsPatrick Steinhardt, Mar 20, 2026
  14. 11/14 builtin/fsck: stop using `the_repository` when checking packed objectsPatrick Steinhardt, Mar 20, 2026
  15. 12/14 builtin/fsck: stop using `the_repository` when marking objectsPatrick Steinhardt, Mar 20, 2026
  16. 13/14 fsck: provide repository in `struct fsck_report_object`Patrick Steinhardt, Mar 20, 2026
  17. Junio C HamanoMar 20, 2026
  18. 14/14 builtin/fsck: stop using `the_repository` in error reportingPatrick Steinhardt, Mar 20, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.