]> git.ipfire.org Git - thirdparty/git.git/commit
refs/reftable: lazy-load configuration to fix chicken-and-egg
authorPatrick Steinhardt <ps@pks.im>
Thu, 25 Jun 2026 09:20:08 +0000 (11:20 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 26 Jun 2026 15:27:19 +0000 (08:27 -0700)
commit79fa75d499d767540fae8d85ab62391cae6591f9
tree2958c7115afee15649c05e0549b98104a27dff68
parent44f46f2be5b6fb47733e495be3de21eeec4c7ede
refs/reftable: lazy-load configuration to fix chicken-and-egg

Same as with the "files" backend, the "reftable" backend also has a
chicken-and-egg problem with "onbranch" conditions. Fix this issue the
same as we did with the "files" backend by lazy-loading configuration.

Now that both the "files" and the "reftable" backend handle this
properly, add a generic test to t1400 that verifies that the user can
configure "core.logAllRefUpdates" via an "onbranch" condition. This is
mostly a nonsensical thing to do in the first place, but it serves as a
good sanity check.

Note that we had to move `should_write_log()` around so that it can
access the new `reftable_be_write_options()` function.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
refs/reftable-backend.c
t/t0613-reftable-write-options.sh
t/t1400-update-ref.sh