git/refs
shejialuo e6ba4c07b8 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>
2025-02-27 14:03:08 -08:00
..
debug.c global: trivial conversions to fix `-Wsign-compare` warnings 2024-12-06 20:20:04 +09:00
files-backend.c Merge branch 'kn/reflog-migration' 2024-12-23 09:32:29 -08:00
iterator.c global: mark code units that generate warnings with `-Wsign-compare` 2024-12-06 20:20:02 +09:00
packed-backend.c packed-backend: add "packed-refs" entry consistency check 2025-02-27 14:03:08 -08:00
packed-backend.h refs/files: use heuristic to decide whether to repack with `--auto` 2024-09-04 08:03:24 -07:00
ref-cache.c ref-cache: fix invalid free operation in `free_ref_entry` 2024-11-27 04:34:37 +09:00
ref-cache.h refs: keep track of unresolved reference value in iterators 2024-08-09 08:47:33 -07:00
refs-internal.h Merge branch 'kn/reflog-migration' 2024-12-23 09:32:29 -08:00
reftable-backend.c Merge branch 'kn/reflog-migration' 2024-12-23 09:32:29 -08:00