diff options
| author | Patrick Steinhardt <ps@pks.im> | 2026-07-13 07:52:12 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-07-13 08:13:16 -0700 |
| commit | 841ca632be7ad515c4e8f0d5b4ab2cba7454f402 (patch) | |
| tree | 03c19072647f873d9443ef896e6588a09be39d28 /t/t4013/diff.diff_initial..side | |
| parent | 7d663dd83ba2ae459178c98f96c0761d044698b4 (diff) | |
builtin/gc: introduce `odb_optimize_required()`
When invoking either git-gc(1) or git-maintenance(1) with the "--auto"
flag then we only perform those maintenance tasks that are actually
required. This logic is inherently an implementation detail of the
object database backend that's in use. But the logic is scattered around
multiple different functions, which makes it hard to make the logic
pluggable.
Introduce a new `odb_optimize_required()` function that allows us to
check these conditions in a generic way.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4013/diff.diff_initial..side')
0 files changed, 0 insertions, 0 deletions
