diff options
author | Patrick Steinhardt <ps@pks.im> | 2024-05-13 10:47:56 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-05-14 02:04:19 +0200 |
commit | 08efe69212fc158fb17294fc3396fa9d048d2285 (patch) | |
tree | 123cb3f2a7b3d7880798fb23875c2b477b632078 /reftable/merged.c | |
parent | reftable/reader: adapt interface to allow reuse of iterators (diff) | |
download | git-08efe69212fc158fb17294fc3396fa9d048d2285.tar.xz git-08efe69212fc158fb17294fc3396fa9d048d2285.zip |
reftable/stack: provide convenience functions to create iterators
There exist a bunch of call sites in the reftable backend that want to
create iterators for a reftable stack. This is rather convoluted right
now, where you always have to go via the merged table. And it is about
to become even more convoluted when we split up iterator initialization
and seeking in the next commit.
Introduce convenience functions that allow the caller to create an
iterator from a reftable stack directly without going through the merged
table. Adapt callers accordingly.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'reftable/merged.c')
-rw-r--r-- | reftable/merged.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/reftable/merged.c b/reftable/merged.c index fc7946d90d..d127f99360 100644 --- a/reftable/merged.c +++ b/reftable/merged.c @@ -253,9 +253,9 @@ reftable_merged_table_min_update_index(struct reftable_merged_table *mt) return mt->min; } -static void merged_table_init_iter(struct reftable_merged_table *mt, - struct reftable_iterator *it, - uint8_t typ) +void merged_table_init_iter(struct reftable_merged_table *mt, + struct reftable_iterator *it, + uint8_t typ) { struct merged_iter *mi = reftable_malloc(sizeof(*mi)); merged_iter_init(mi, mt, typ); |