summaryrefslogtreecommitdiff
path: root/builtin/gc.c
diff options
context:
space:
mode:
authorLibravatar Derrick Stolee <dstolee@microsoft.com>2021-02-09 13:42:29 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-02-09 23:09:29 -0800
commitacc1c4d5d4c80c4fd93aaa151caa5593656600ae (patch)
tree406750d787e4ed5de65990a493247eaecf64c278 /builtin/gc.c
parentmaintenance: add pack-refs task (diff)
downloadtgif-acc1c4d5d4c80c4fd93aaa151caa5593656600ae.tar.xz
maintenance: incremental strategy runs pack-refs weekly
When the 'maintenance.strategy' config option is set to 'incremental', a default maintenance schedule is enabled. Add the 'pack-refs' task to that strategy at the weekly cadence. Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Reviewed-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/gc.c')
-rw-r--r--builtin/gc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin/gc.c b/builtin/gc.c
index 41bec4f177..6db9cb39e6 100644
--- a/builtin/gc.c
+++ b/builtin/gc.c
@@ -1352,6 +1352,8 @@ static void initialize_maintenance_strategy(void)
tasks[TASK_INCREMENTAL_REPACK].schedule = SCHEDULE_DAILY;
tasks[TASK_LOOSE_OBJECTS].enabled = 1;
tasks[TASK_LOOSE_OBJECTS].schedule = SCHEDULE_DAILY;
+ tasks[TASK_PACK_REFS].enabled = 1;
+ tasks[TASK_PACK_REFS].schedule = SCHEDULE_WEEKLY;
}
}