Re: [PATCH 8/8] builtin/maintenance: use "geometric" strategy by default
On Sun, Feb 22, 2026 at 07:52:40PM -0500, Derrick Stolee wrote:
Show 22 quoted lines
> On 2/20/26 5:15 AM, Patrick Steinhardt wrote:
> > The git-gc(1) command has been introduced in the early days of Git in
> > 30f610b7b0 (Create 'git gc' to perform common maintenance operations.,
> > 2006-12-27) as the main repository maintenance utility. And while the
> > tool has of course evolved since then to cover new parts, the basic
> > strategy it uses has never really changed much.
>
> I agree that the 'gc' strategy no longer serves users as a good default.
> For those that want foreground commands to trigger maintenance (detached
> on Unix, and as a blocking child on Windows) the 'geometric' strategy is
> a good one.
>
> > Switch the default strategy away from "gc" to "geometric", but retain
> > the "incremental" strategy configured by Scalar.
>
> Instead of "configured by Scalar" I'd say instead "configured when
> initializing background maintenance with 'git maintenance start'" which
> is how how Scalar sets this up indirectly.
>
> Users could still opt-in to 'geometric' in the background, but it
> would cause difficulties for the largest of repos that rely on the
> 'incremental' strategy's limit of the amount of data processed.
Makes sense, will rephrase.
Show 8 quoted lines
> > } else {
> > - strategy = gc_strategy;
> > + strategy = geometric_strategy;
> > type = MAINTENANCE_TYPE_MANUAL;
> > }
>
> Should this include some kind of documentation update in
> Documentation/config/maintenance.adoc?Oh, right, it definitely should!
Patrick