On 4/25/2025 3:29 AM, Patrick Steinhardt wrote: > 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. Thanks for putting this together. I think this is a noble goal, allowing users and system administrators more options to fine-tune the best ways to optimize their repos. I wonder if any of these fine-grained steps would be valuable to add to the default background maintenance schedule (perhaps as a follow-up)? > Patrick Steinhardt (7): > builtin/gc: fix indentation of `cmd_gc()` parameters > builtin/gc: remove global variables where it trivial to do These first two patches are simple cleanups. Thanks for isolating them. > builtin/gc: move pruning of worktrees into a separate function This is a nice refactor with a clean method body extraction. > worktree: expose function to retrieve worktree names This one is a bit messier, but still really good as it makes the prune_worktrees() method in builtin/worktree.c less complicated. There's just no way to make the removal of those variables look clean. > builtin/maintenance: introduce "worktree-prune" task This is where we start getting into new behavior. More comments on the patch itself. > builtin/gc: move rerere garbage collection into separate function > builtin/maintenance: introduce "rerere-gc" task These are a nice one-two punch for this new task. Thanks, -Stolee