diff options
author | shejialuo <shejialuo@gmail.com> | 2025-02-28 00:07:17 +0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2025-02-27 14:03:08 -0800 |
commit | e6ba4c07b85a0a8fee84b6ac7ab414d47a5351f2 (patch) | |
tree | 7b341b4e6181794ce6df312b06deb345d9a984c2 /builtin/commit-graph.c | |
parent | 5637d5542021294e81cf0d8344fe140368117296 (diff) |
packed-backend: add "packed-refs" entry consistency check
"packed-backend.c::next_record" will parse the ref entry to check the
consistency. This function has already checked the following things:
1. Parse the main line of the ref entry to inspect whether the oid is
not correct. Then, check whether the next character is oid. Then
check the refname.
2. If the next line starts with '^', it would continue to parse the
peeled oid and check whether the last character is '\n'.
As we decide to implement the ref consistency check for "packed-refs",
let's port these two checks and update the test to exercise the code.
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 'builtin/commit-graph.c')
0 files changed, 0 insertions, 0 deletions