Subject: Re: [PATCH v2 0/8] builtin/maintenance: implement missing tasks compared to git-gc(1)

From: Derrick Stolee <[email-masked]>
Date: Wed, 30 Apr 2025 06:37:08 -0400

On 4/30/2025 6:25 AM, Patrick Steinhardt wrote:
> Hi,
> 
> this small patch series implements the last couple of remaining tasks
> that are missing compared to the functionality git-gc(1) provides.
> 
> Right now, git-maintenance(1) still executes git-gc(1). With these last
> gaps plugged though we can in theory fully replace git-gc(1) with finer
> grained tasks without losing any functionality. The benefit is that it
> becomes possible for users to have finer-grained control over what
> exactly the maintenance does.
> 
> This patch series doesn't do that yet, but only implements whatever is
> needed to get there.
> 
> Changes in v2:
>   - Introduce "maintenance.worktree-prune.auto", which controls how many
>     stale worktrees need to exist before executing `git worktree prune`.
>   - Introduce "maintenance.rerere-gc.auto", which controls how many
>     stale rerere entries need to exist before executing `git rerere gc`.
>   - Add tests to verify that "gc.worktreePruneExpire" works.
>   - Remove some fragile test logic by introducing functions that check
>     for a given maintenance subprocess.
>   - Link to v1: https://lore.kernel.org/r/[email-masked]

This version satisfies my comments from v1 and builds further by including
the maintenance.<task>.auto config options.

LGTM. Thanks,
-Stolee