builtin/maintenance: use "geometric" strategy by default

Hi,

this patch series is a follow-up to Git 2.52, where I introduced a new "geometric" strategy for repository maintenance. The main selling point of this strategy is improved heuristics for repacking objects: whereas git-gc(1) regularly performs all-into-one repacks, the geometric strategy only does that in case a significant number of objects have been added to the repository. This is a significant improvement, especially for large repositories.

This patch series thus proposes to make the "geometric" strategy the default strategy for our housekeeping to finally start sunsetting git-gc(1). Both GitHub and GitLab have been running with geometric repacking in production systems for a long time already, which makes me reasonably sure that it works as expected.

That being said, I discovered one bug in this series: geometric repacking does not work for repositories that have promisor remotes. This bug is fixed in the first patch though. Other than that, most of the patches adapt our tests to fix races and implicit reliance on the default maintenance strategy.

The final patch starts to use the "geometric" strategy unconditionally. I was initially pondering whether we maybe want to guard it with "feature.experimental" or maybe even WITH_BREAKING_CHANGES. For now I decided against that, but I'm happy to revisit that decision.

Thanks!

Patrick

To: git@vger.kernel.org Cc: Taylor Blau me@ttaylorr.com Cc: Derrick Stolee stolee@gmail.com

--- b4-submit-tracking ---

This section is used internally by b4 prep for tracking purposes.

{ "series": { "revision": 1, "change-id": "20251204-b4-pks-maintenance-default-geometric-strategy-bb4083796238", "prefixes": [] } }

Closes Stop using git-gc(1) in git-maintenance(1) by d... (#538).

Merge request reports

Loading