Hi All: This patch aims at adding ref content check for files backend. By the RFC we have discussed, I add three types of checks. 1. Check regular ref content. I enhance the "parse_loose_ref_contents" to validate the content of the regular ref and warn the user about the trailing garbage. 2. Check symbolic ref content. Check the trailing garbage and content. 3. Check symlink ref by reusing the function introduced by #2. The CI is passed: https://github.com/shejialuo/git/pull/14 Thanks, Jialuo shejialuo (4): fsck: introduce "FSCK_REF_REPORT_DEFAULT" macro ref: add regular ref content check for files backend ref: add symbolic ref content check for files backend ref: add symlink ref consistency check for files backend Documentation/fsck-msgids.txt | 12 +++ fsck.h | 10 ++ refs.c | 2 +- refs/files-backend.c | 188 +++++++++++++++++++++++++++++++++- refs/refs-internal.h | 2 +- t/t0602-reffiles-fsck.sh | 183 +++++++++++++++++++++++++++++++++ 6 files changed, 392 insertions(+), 5 deletions(-) -- 2.46.0