]> git.ipfire.org Git - thirdparty/git.git/commit
refs/files: extract function to check single ref
authorPatrick Steinhardt <ps@pks.im>
Mon, 12 Jan 2026 09:02:54 +0000 (10:02 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 12 Jan 2026 14:55:40 +0000 (06:55 -0800)
commit0ff9cf40b2ce3df2f6eda0875eb54fe3c3487f5b
tree32737af0cbdd07cede2ceae36cf72a582cac897a
parent2fe33ae20fcce7a1e91cfeec37409d511ab8aefb
refs/files: extract function to check single ref

When checking the consistency of references we create a directory
iterator and then verify each single reference in a loop. The logic to
perform the actual checks is embedded into that loop, which makes it
hard to reuse. But In a subsequent commit we're about to introduce a
second path that wants to verify references.

Prepare for this by extracting the logic to check a single reference
into a standalone function.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
refs/files-backend.c