Re: [PATCH 8/8] builtin/maintenance: use "geometric" strategy by default
- From
Derrick Stolee <stolee@gmail.com>
- Date
- Feb 23, 2026, 00:52 UTC
- Message-ID
- <4ec59d18-5aef-48e9-a4ec-77e20a2a14c8@gmail.com>
- In-Reply-To
- <20260220-b4-pks-maintenance-default-geometric-strategy-v1-8-faeb321ad13b@pks.im>
On 2/20/26 5:15 AM, Patrick Steinhardt wrote:
Show 5 quoted lines
> 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.
Show 5 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?
Thanks, -Stolee