aboutsummaryrefslogtreecommitdiff
path: root/reftable
diff options
context:
space:
mode:
Diffstat (limited to 'reftable')
-rw-r--r--reftable/reftable-stack.h9
-rw-r--r--reftable/stack.c8
2 files changed, 10 insertions, 7 deletions
diff --git a/reftable/reftable-stack.h b/reftable/reftable-stack.h
index 910ec6ef3a..d70fcb705d 100644
--- a/reftable/reftable-stack.h
+++ b/reftable/reftable-stack.h
@@ -68,12 +68,15 @@ int reftable_addition_commit(struct reftable_addition *add);
* transaction. Releases the lock if held. */
void reftable_addition_destroy(struct reftable_addition *add);
-/* add a new table to the stack. The write_table function must call
- * reftable_writer_set_limits, add refs and return an error value. */
+/*
+ * Add a new table to the stack. The write_table function must call
+ * reftable_writer_set_limits, add refs and return an error value.
+ * The flags are passed through to `reftable_stack_new_addition()`.
+ */
int reftable_stack_add(struct reftable_stack *st,
int (*write_table)(struct reftable_writer *wr,
void *write_arg),
- void *write_arg);
+ void *write_arg, unsigned flags);
struct reftable_iterator;
diff --git a/reftable/stack.c b/reftable/stack.c
index 9db90cf4ed..1ce4d90cb8 100644
--- a/reftable/stack.c
+++ b/reftable/stack.c
@@ -736,12 +736,12 @@ done:
static int stack_try_add(struct reftable_stack *st,
int (*write_table)(struct reftable_writer *wr,
void *arg),
- void *arg)
+ void *arg, unsigned flags)
{
struct reftable_addition add;
int err;
- err = reftable_stack_init_addition(&add, st, 0);
+ err = reftable_stack_init_addition(&add, st, flags);
if (err < 0)
goto done;
@@ -757,9 +757,9 @@ done:
int reftable_stack_add(struct reftable_stack *st,
int (*write)(struct reftable_writer *wr, void *arg),
- void *arg)
+ void *arg, unsigned flags)
{
- int err = stack_try_add(st, write, arg);
+ int err = stack_try_add(st, write, arg, flags);
if (err < 0) {
if (err == REFTABLE_OUTDATED_ERROR) {
/* Ignore error return, we want to propagate