Re: [PATCH v2 2/2] reftable: fix quadratic behavior in the presence of tombstones
On Thu, Jul 09, 2026 at 04:48:43PM +0200, Kristofer Karlsson wrote:
Show 26 quoted lines
> On Thu, 9 Jul 2026 at 15:53, Patrick Steinhardt <ps@pks.im> wrote:
> >
> > On Thu, Jul 09, 2026 at 12:08:31PM +0000, Kristofer Karlsson via GitGitGadget wrote:
> > > diff --git a/reftable/stack.c b/reftable/stack.c
> > > index ab12926708..fd7d8f3f1e 100644
> > > --- a/reftable/stack.c
> > > +++ b/reftable/stack.c
> > > @@ -337,7 +337,6 @@ static int reftable_stack_reload_once(struct reftable_stack *st,
> > > /* Update the stack to point to the new tables. */
> > > if (st->merged)
> > > reftable_merged_table_free(st->merged);
> > > - new_merged->suppress_deletions = 1;
> > > st->merged = new_merged;
> > >
> > > if (st->tables)
> >
> > Okay, we still retain the field after this patch. But the question is:
> > how would libgit2 now set it? I think we should rather extend the
> > `struct reftable_stack_options` so that the caller can control whether
> > or not to suppress deletions at stack creation time.
>
> You are right, I (still) missed the compatibility problem here.
>
> I started thinking about a way to make it fully backwards compatible,
> but then I looked at the libgit2 repo and realized it will need
> updating anyway since it predates the reftable_stack_options split.
Yeah, that's something I'll handle soon(ish).
> I will add suppress_deletions to reftable_stack_options as you
> suggested.