summaryrefslogtreecommitdiff
path: root/commit.c
diff options
context:
space:
mode:
authorshejialuo <shejialuo@gmail.com>2024-08-08 19:31:42 +0800
committerJunio C Hamano <gitster@pobox.com>2024-08-08 09:36:53 -0700
commit1c31be45b3b263670c7d2a91c27cc119b77dd2e2 (patch)
treed843a268b7200c0def39a6d36c139a7d26b64ed8 /commit.c
parenta7600b8481b533d77a2cc5f03acdbed12b996fcd (diff)
fsck: add ref name check for files backend
The git-fsck(1) only implicitly checks the reference, it does not fully check refs with bad format name such as standalone "@". However, a file ending with ".lock" should not be marked as having a bad ref name. It is expected that concurrent writers may have such lock files. We currently ignore this situation. But for bare ".lock" file, we will report it as error. In order to provide such checks, add a new fsck message id "badRefName" with default ERROR type. Use existing "check_refname_format" to explicit check the ref name. And add a new unit test to verify the functionality. Mentored-by: Patrick Steinhardt <ps@pks.im> Mentored-by: Karthik Nayak <karthik.188@gmail.com> Signed-off-by: shejialuo <shejialuo@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.c')
0 files changed, 0 insertions, 0 deletions