summaryrefslogtreecommitdiffstats
path: root/t/t4013/diff.format-patch_--stdout_initial..main^
diff options
context:
space:
mode:
authorKarthik Nayak <karthik.188@gmail.com>2026-05-17 19:32:05 +0200
committerJunio C Hamano <gitster@pobox.com>2026-05-18 08:43:32 +0900
commite0fcba2d9cf86ba45943066924f111006d55ba08 (patch)
tree7e37e68c1b56cbd2acb8658765898ac6f45b867d /t/t4013/diff.format-patch_--stdout_initial..main^
parent94f057755b7941b321fd11fec1b2e3ca5313a4e0 (diff)
downloadgit-e0fcba2d9cf86ba45943066924f111006d55ba08.tar.gz
git-e0fcba2d9cf86ba45943066924f111006d55ba08.zip
refs/files: skip lock files during consistency checks
Consistency checks in the files reference backend involve two steps: 1. Iterate over all entries within the 'refs/' directory and call `files_fsck_ref()` on each. 2. Iterate over all root refs via `for_each_root_ref()` and call `files_fsck_ref()` on each. `files_fsck_ref()` then runs all fsck checks defined in `fsck_refs_fn[]`. Step 2 goes through the refs API and only sees valid refs, but step 1 iterates the directory directly and may also encounter intermediate '*.lock' files. Currently, `files_fsck_refs_name()`, one of the functions in `fsck_refs_fn[]`, filters out lock files itself. The other function, `files_fsck_refs_content()`, has no such check and would parse the lock file. Any new function added to `fsck_refs_fn[]` would have the same problem. Move the filter up into `files_fsck_refs_dir()`, where the directory iteration happens. Since step 2 cannot produce lock files, this is the only site where the filter is needed, and individual checks no longer have to re-implement it. Signed-off-by: Karthik Nayak <karthik.188@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4013/diff.format-patch_--stdout_initial..main^')
0 files changed, 0 insertions, 0 deletions