builtin/maintenance: make the geometric factor configurable

The geometric repacking task uses a factor of two for its geometric
sequence, meaning that each next pack must contain at least twice as
many objects as the next-smaller one. In some cases it may be helpful to
configure this factor though to reduce the number of packfile merges
even further, e.g. in very big repositories. But while git-repack(1)
itself supports doing this, the maintenance task does not give us a way
to tune it.

Introduce a new "maintenance.geometric-repack.splitFactor" configuration
to plug this gap.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Acked-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Patrick Steinhardt
2025-10-24 08:57:17 +02:00
committed by Junio C Hamano
parent 9bc151850c
commit 5c2ad50193
3 changed files with 45 additions and 1 deletions

View File

@@ -86,6 +86,11 @@ maintenance.geometric-repack.auto::
objects that would be written into a new packfile. The default value is
100.
maintenance.geometric-repack.splitFactor::
This integer config option controls the factor used for the geometric
sequence. See the `--geometric=` option in linkgit:git-repack[1] for
more details. Defaults to `2`.
maintenance.reflog-expire.auto::
This integer config option controls how often the `reflog-expire` task
should be run as part of `git maintenance run --auto`. If zero, then