From: Patrick Steinhardt Date: Fri, 09 Jan 2026 12:39:29 GMT Subject: [PATCH 00/17] Fixes and improvements for ref consistency checks Message-ID: <20260109-pks-refs-verify-fixes-v1-0-3587dba18294@pks.im> Hi, this patch series contains a bunch of fixes and improvements for ref consistency checks. It is structured as follows: - Patches 1 to 4 contain a couple of cleanups for the consistency checks done by the "files" backend. - Patches 5 to 7 introduce checks for root refs for the "files" backend. - Patches 9 to 14 introduce infrastructure for shared checks with the "files" and "reftable" backend. - Patches 15 to 17 move some ref consistency checks that were still driven by git-fsck(1) into `git refs verify`. Thanks! Patrick --- Patrick Steinhardt (17): refs/files: simplify iterating through root refs refs/files: move fsck functions into global scope refs/files: remove `refs_check_dir` parameter refs/files: remove useless indirection refs/files: extract function to check single ref refs/files: improve error handling when verifying symrefs refs/files: perform consistency checks for root refs fsck: drop unused fields from `struct fsck_ref_report` refs/files: extract generic symref target checks refs/files: introduce function to perform normal ref checks refs/reftable: adapt includes to become consistent refs/reftable: extract function to retrieve backend for worktree refs/reftable: fix consistency checks with worktrees refs/reftable: introduce generic checks for refs builtin/fsck: move generic object ID checks into `refs_fsck()` builtin/fsck: move generic HEAD check into `refs_fsck()` builtin/fsck: drop `fsck_head_link()` Documentation/fsck-msgids.adoc | 6 ++ builtin/fsck.c | 46 +-------- fsck.c | 5 - fsck.h | 4 +- refs.c | 43 ++++++++ refs.h | 18 ++++ refs/files-backend.c | 230 ++++++++++++++++++++++++----------------- refs/reftable-backend.c | 167 ++++++++++++++++++++++-------- t/t0602-reffiles-fsck.sh | 30 ++++++ t/t0614-reftable-fsck.sh | 44 ++++++++ t/t1450-fsck.sh | 10 +- 11 files changed, 416 insertions(+), 187 deletions(-) --- base-commit: d529f3a197364881746f558e5652f0236131eb86 change-id: 20260109-pks-refs-verify-fixes-1e47872317cf