From: Patrick Steinhardt <ps@pks.im>
To: Justin Tobler <jltobler@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 01/10] reftable/merged: expose functions to initialize iterators
Date: Tue, 20 Aug 2024 14:00:49 +0200 [thread overview]
Message-ID: <ZsSFcXr1NQqHYWi9@tanuki> (raw)
In-Reply-To: <wb5nteglnm4bfu5pe3xqtdatsv4byyah4py6m2imp6wsh2xspo@bft2kvapv6vh>
On Mon, Aug 19, 2024 at 11:55:16AM -0500, Justin Tobler wrote:
> 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@pks.im>
> > ---
> [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?
The latter. It really should exist to make the public interface
complete.
Patrick
next prev parent reply other threads:[~2024-08-20 12:00 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-13 6:24 [PATCH 00/10] reftable: drop generic `reftable_table` interface Patrick Steinhardt
2024-08-13 6:24 ` [PATCH 01/10] reftable/merged: expose functions to initialize iterators Patrick Steinhardt
2024-08-13 9:36 ` karthik nayak
2024-08-14 12:56 ` Patrick Steinhardt
2024-08-19 16:55 ` Justin Tobler
2024-08-20 12:00 ` Patrick Steinhardt [this message]
2024-08-13 6:24 ` [PATCH 02/10] reftable/merged: rename `reftable_new_merged_table()` Patrick Steinhardt
2024-08-13 6:24 ` [PATCH 03/10] reftable/merged: stop using generic tables in the merged table Patrick Steinhardt
2024-08-13 9:58 ` karthik nayak
2024-08-19 16:47 ` Justin Tobler
2024-08-13 6:24 ` [PATCH 04/10] reftable/stack: open-code reading refs Patrick Steinhardt
2024-08-13 6:24 ` [PATCH 05/10] reftable/iter: drop double-checking logic Patrick Steinhardt
2024-08-13 6:57 ` Eric Sunshine
2024-08-13 6:24 ` [PATCH 06/10] reftable/generic: move generic iterator code into iterator interface Patrick Steinhardt
2024-08-13 10:04 ` karthik nayak
2024-08-14 12:56 ` Patrick Steinhardt
2024-08-14 16:24 ` Junio C Hamano
2024-08-15 11:04 ` karthik nayak
2024-08-13 6:24 ` [PATCH 07/10] reftable/dump: drop unused `compact_stack()` Patrick Steinhardt
2024-08-13 6:24 ` [PATCH 08/10] reftable/dump: drop unused printing functionality Patrick Steinhardt
2024-08-13 10:14 ` karthik nayak
2024-08-14 12:56 ` Patrick Steinhardt
2024-08-13 6:24 ` [PATCH 09/10] reftable/dump: move code into "t/helper/test-reftable.c" Patrick Steinhardt
2024-08-13 6:24 ` [PATCH 10/10] reftable/generic: drop interface Patrick Steinhardt
2024-08-13 10:17 ` [PATCH 00/10] reftable: drop generic `reftable_table` interface karthik nayak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZsSFcXr1NQqHYWi9@tanuki \
--to=ps@pks.im \
--cc=git@vger.kernel.org \
--cc=jltobler@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox