From: Patrick Steinhardt Date: Fri, 07 Nov 2025 06:06:25 GMT Subject: Re: [PATCH v3 2/5] reftable/stack: add function to check if optimization is required Message-ID: In-Reply-To: On Thu, Nov 06, 2025 at 10:18:37AM -0800, Junio C Hamano wrote: > Karthik Nayak writes: > > diff --git a/reftable/stack.c b/reftable/stack.c > > index 49387f9344..826500abed 100644 > > --- a/reftable/stack.c > > +++ b/reftable/stack.c > > @@ -1647,19 +1647,51 @@ static int stack_segments_for_compaction(struct reftable_stack *st, > > return 0; > > } > > > > -int reftable_stack_auto_compact(struct reftable_stack *st) > > +static int update_segment_if_compaction_required(struct reftable_stack *st, > > + struct segment *seg, > > + bool use_heuristics, > > + bool *required) > > { > > Am I correct to understand that "use_heuristics" is almost a synonym > to "maintain geometric progression" in the context of this patch? > Are we expecting other heuristics in the future, in which case, this > may not be a single "bool" but a set of flag bits, and until then > s/heuristics/geometric/ might make it a better name for the > parameter? I don't expect that this will change anytime soon. So renaming it accordingly feels like the right direction to me indeed. Patrick