refs/reftable: perform explicit D/F check when writing symrefs
commit455d61b6d22b41176194483f82c9caa531661bec
authorPatrick Steinhardt <ps@pks.im>
Mon, 8 Apr 2024 12:23:56 +0000 (8 14:23 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 8 Apr 2024 23:59:01 +0000 (8 16:59 -0700)
tree1a8c5edc0b2d3dd09117adb81e62bc13b932b36b
parentf57cc987a937bef3f6c8e4911cf98e0f51eee1e2
refs/reftable: perform explicit D/F check when writing symrefs

We already perform explicit D/F checks in all reftable callbacks which
write refs, except when writing symrefs. For one this leads to an error
message which isn't perfectly actionable because we only tell the user
that there was a D/F conflict, but not which refs conflicted with each
other. But second, once all ref updating callbacks explicitly check for
D/F conflicts, we can disable the D/F checks in the reftable library
itself and thus avoid some duplicated efforts.

Refactor the code that writes symref tables to explicitly call into
`refs_verify_refname_available()` when writing symrefs.

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