Hi all: This patch mainly does the following three things: 1. Add some extra checks which I have ignored in the previous patches for files-backend in 2. Add ref checks for packed-backend. 1. Check whether the type of "packed-refs" is correct. 2. Check whether the syntax of "packed-refs" is correct by using the rules from "packed-backend.c::create_snapshot" and "packed-backend.c::next_record". 3. Check whether the pointed object exists and whether the "packed-refs" file is sorted. 3. Call "git refs verify" for "git-fsck(1)". Although I am not mentored by Patrick and Karthik in this patch. I'd like to add "Mentored-by" filed for them due to the reason that I continue my GSoC work. Thanks, Jialuo shejialuo (10): files-backend: add object check for regular ref builtin/refs.h: get worktrees without reading head info packed-backend: check whether the "packed-refs" is regular packed-backend: add "packed-refs" header consistency check packed-backend: check whether the refname contains NULL binaries packed-backend: add "packed-refs" entry consistency check packed-backend: create "fsck_packed_ref_entry" to store parsing info packed-backend: add check for object consistency packed-backend: check whether the "packed-refs" is sorted builtin/fsck: add `git refs verify` child process Documentation/fsck-msgids.txt | 22 ++ builtin/fsck.c | 28 +++ builtin/refs.c | 2 +- fsck.h | 8 + refs/files-backend.c | 54 ++++- refs/packed-backend.c | 413 +++++++++++++++++++++++++++++++++- t/t0602-reffiles-fsck.sh | 209 +++++++++++++++++ worktree.c | 5 + worktree.h | 6 + 9 files changed, 723 insertions(+), 24 deletions(-) -- 2.47.1