]> git.ipfire.org Git - thirdparty/git.git/commit
reftable/stack: allow passing flags to `reftable_stack_add()`
authorPatrick Steinhardt <ps@pks.im>
Tue, 12 Aug 2025 09:54:19 +0000 (11:54 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 12 Aug 2025 14:40:59 +0000 (07:40 -0700)
commit178c5885007b83dd10cac1e09b72ef8d9fe2ac29
tree9d00bd40837cd9c1d026140d419f673ac8c9c2e3
parent6fb1d819b7c7796e7cfaae44f056d73436469efc
reftable/stack: allow passing flags to `reftable_stack_add()`

The `reftable_stack_add()` function is a simple wrapper to lock the
stack, add records to it via a callback and then commit the
result. One problem with it though is that it doesn't accept any flags
for creating the addition. This makes it impossible to automatically
reload the stack in case it was modified before we managed to lock the
stack.

Add a `flags` field to plug this gap and pass it through accordingly.
For now this new flag won't be used by us, but it will be used by
libgit2.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
refs/reftable-backend.c
reftable/reftable-stack.h
reftable/stack.c
t/unit-tests/t-reftable-stack.c