diff options
author | shejialuo <shejialuo@gmail.com> | 2024-08-08 13:31:42 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-08-08 18:36:53 +0200 |
commit | 1c31be45b3b263670c7d2a91c27cc119b77dd2e2 (patch) | |
tree | d843a268b7200c0def39a6d36c139a7d26b64ed8 /Documentation/fsck-msgids.txt | |
parent | files-backend: add unified interface for refs scanning (diff) | |
download | git-1c31be45b3b263670c7d2a91c27cc119b77dd2e2.tar.xz git-1c31be45b3b263670c7d2a91c27cc119b77dd2e2.zip |
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 'Documentation/fsck-msgids.txt')
-rw-r--r-- | Documentation/fsck-msgids.txt | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Documentation/fsck-msgids.txt b/Documentation/fsck-msgids.txt index 7c809fddf1..68a2801f15 100644 --- a/Documentation/fsck-msgids.txt +++ b/Documentation/fsck-msgids.txt @@ -22,6 +22,9 @@ `badRefFiletype`:: (ERROR) A ref has a bad file type. +`badRefName`:: + (ERROR) A ref has an invalid format. + `badTagName`:: (INFO) A tag has an invalid format. |