On 24/08/13 08:24AM, Patrick Steinhardt wrote: > We do not expose any functions via our public headers that would allow a > caller to initialize a reftable iterator from a merged table. Instead, > they are expected to go via the generic `reftable_table` interface, > which is somewhat roundabout. > > Implement two new functions to initialize iterators for ref and log > records to plug this gap. > > Signed-off-by: Patrick Steinhardt <ps@xxxxxx> > --- [snip] > diff --git a/reftable/reftable-merged.h b/reftable/reftable-merged.h > index 14d5fc9f05..4deb0ad22e 100644 > --- a/reftable/reftable-merged.h > +++ b/reftable/reftable-merged.h > @@ -36,6 +36,14 @@ int reftable_new_merged_table(struct reftable_merged_table **dest, > struct reftable_table *stack, size_t n, > uint32_t hash_id); > > +/* Initialize a merged table iterator for reading refs. */ > +void reftable_merged_table_init_ref_iterator(struct reftable_merged_table *mt, > + struct reftable_iterator *it); > + > +/* Initialize a merged table iterator for reading logs. */ > +void reftable_merged_table_init_log_iterator(struct reftable_merged_table *mt, > + struct reftable_iterator *it); I might have missed it, but I do not see `reftable_merged_table_init_log_iterator()` used anywhere in the later patches. Does this need to be added? Or are we just adding it because we want a companion function to the ref iterator to be more consistent? -Justin