Hi, This patch mainly focuses on two things: 1. Setup the infrastructure of the ref consistency check. 2. Implement ref name and content checks for files backend to verify the correctness about the infrastructure with corresponding unit test. See https://github.com/shejialuo/git/pull/1 for CI. Thanks, Jialuo shejialuo (2): refs: setup ref consistency check infrastructure refs: add name and content check for file backend builtin/fsck.c | 5 ++ refs.c | 5 ++ refs.h | 5 ++ refs/files-backend.c | 119 ++++++++++++++++++++++++++++++++++- refs/packed-backend.c | 7 +++ refs/refs-internal.h | 4 ++ refs/reftable-backend.c | 7 +++ t/t0602-reffiles-fsck.sh | 132 +++++++++++++++++++++++++++++++++++++++ 8 files changed, 283 insertions(+), 1 deletion(-) create mode 100755 t/t0602-reffiles-fsck.sh -- 2.45.1