aboutsummaryrefslogtreecommitdiffstats
path: root/reftable/reftable-stack.h
diff options
context:
space:
mode:
Diffstat (limited to 'reftable/reftable-stack.h')
-rw-r--r--reftable/reftable-stack.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/reftable/reftable-stack.h b/reftable/reftable-stack.h
index 1b602dda58..09e97c9991 100644
--- a/reftable/reftable-stack.h
+++ b/reftable/reftable-stack.h
@@ -29,7 +29,7 @@ struct reftable_stack;
* stored in 'dir'. Typically, this should be .git/reftables.
*/
int reftable_new_stack(struct reftable_stack **dest, const char *dir,
- struct reftable_write_options config);
+ const struct reftable_write_options *opts);
/* returns the update_index at which a next table should be written. */
uint64_t reftable_stack_next_update_index(struct reftable_stack *st);
@@ -66,6 +66,24 @@ int reftable_stack_add(struct reftable_stack *st,
void *write_arg),
void *write_arg);
+struct reftable_iterator;
+
+/*
+ * Initialize an iterator for the merged tables contained in the stack that can
+ * be used to iterate through refs. The iterator is valid until the next reload
+ * or write.
+ */
+void reftable_stack_init_ref_iterator(struct reftable_stack *st,
+ struct reftable_iterator *it);
+
+/*
+ * Initialize an iterator for the merged tables contained in the stack that can
+ * be used to iterate through logs. The iterator is valid until the next reload
+ * or write.
+ */
+void reftable_stack_init_log_iterator(struct reftable_stack *st,
+ struct reftable_iterator *it);
+
/* returns the merged_table for seeking. This table is valid until the
* next write or reload, and should not be closed or deleted.
*/