summaryrefslogtreecommitdiff
path: root/refs/files-backend.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2025-10-24 08:57:20 +0200
committerJunio C Hamano <gitster@pobox.com>2025-10-24 13:42:44 -0700
commit6a7d3eeb4703ab27ec7520d6e7fa9145e66f43dc (patch)
tree3081bfb413e9ff3b74bc4956275d0e2ca7d7b889 /refs/files-backend.c
parente83e92e87672def24d971cdfef801bb0de0d5955 (diff)
builtin/maintenance: run maintenance tasks depending on type
We basically have three different ways to execute repository maintenance: 1. Manual maintenance via `git maintenance run`. 2. Automatic maintenance via `git maintenance run --auto`. 3. Scheduled maintenance via `git maintenance run --schedule=`. At the moment, maintenance strategies only have an effect for the last type of maintenance. This is about to change in subsequent commits, but to do so we need to be able to skip some tasks depending on how exactly maintenance was invoked. Introduce a new maintenance type that discern between manual (1 & 2) and scheduled (3) maintenance. Convert the `enabled` field into a bitset so that it becomes possible to specifiy which tasks exactly should run in a specific context. The types picked for existing strategies match the status quo: - The default strategy is only ever executed as part of a manual maintenance run. It is not possible to use it for scheduled maintenance. - The incremental strategy is only ever executed as part of a scheduled maintenance run. It is not possible to use it for manual maintenance. The strategies will be tweaked in subsequent commits to make use of this new infrastructure. Signed-off-by: Patrick Steinhardt <ps@pks.im> Acked-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs/files-backend.c')
0 files changed, 0 insertions, 0 deletions