t1404: make D/F conflict tests compatible with reftable backend
commit3f87bb2c2b83faf7854db293457ed7c275e457e5
authorPatrick Steinhardt <ps@pks.im>
Thu, 15 Feb 2024 08:25:42 +0000 (15 09:25 +0100)
committerJunio C Hamano <gitster@pobox.com>
Thu, 15 Feb 2024 18:12:30 +0000 (15 10:12 -0800)
tree83368c651dfde895afe2bcf55ba36ce0cd73f6f2
parent129a1698747ab2e79a1ad6a3c973e54cc1c57364
t1404: make D/F conflict tests compatible with reftable backend

Some of the tests in t1404 exercise whether Git correctly aborts
transactions when there is a directory/file conflict with ref names.
While these tests are all marked to require the "files" backend, they do
in fact apply to the "reftable" backend as well.

This may not make much sense on the surface: D/F conflicts only exist
because the "files" backend uses the filesystem to store loose refs, and
thus the restriction theoretically shouldn't apply to the "reftable"
backend. But for now, the "reftable" backend artificially restricts the
creation of such conflicting refs so that it is a drop-in replacement
for the "files" backend. This also ensures that the "reftable" backend
can easily be used on the server side without causing issues for clients
which only know to use the "files" backend.

The only difference between the "files" and "reftable" backends is a
slightly different error message. Adapt the tests to accomodate for this
difference and remove the REFFILES prerequisite so that we start testing
with both backends.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t1404-update-ref-errors.sh