Re: [PATCH 7/7] builtin/maintenance: fix auto-detach with non-standard tasks
From: James Liu <hidden>
Date: 2024-08-15 06:40:55
On Tue Aug 13, 2024 at 5:18 PM AEST, Patrick Steinhardt wrote:
quoted hunk ↗ jump to hunk
diff --git a/run-command.c b/run-command.c index 45ba544932..94f2f3079f 100644 --- a/run-command.c +++ b/run-command.c@@ -1808,16 +1808,26 @@ void run_processes_parallel(const struct run_process_parallel_opts *opts) int prepare_auto_maintenance(int quiet, struct child_process *maint) { - int enabled; + int enabled, auto_detach; if (!git_config_get_bool("maintenance.auto", &enabled) && !enabled) return 0; + /* + * When `maintenance.autoDetach` isn't set, then we fall back to + * honoring `gc.autoDetach`. This is somewhat weird, but required to + * retain behaviour from when we used to run git-gc(1) here. + */ + if (git_config_get_bool("maintenance.autodetach", &auto_detach) && + git_config_get_bool("gc.autodetach", &auto_detach)) + auto_detach = 1; +
Do the two `*.autodetach` values need to be camel-cased or does it not matter? I've noticed a mix of both through the codebase so I suppose it's not case-sensitive.