X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=run-command.c;h=ea4d0fb4b154c89a0fcd12d29e41ffcbb2af0302;hb=b5b71cbd5dd2a811bd2ddd0b88da1c337c02bb3c;hp=2ee59acdc8c828ad81ccb7526bd7f23fc460d095;hpb=86e1007abc58f8458ce90dc10a385239722cf08a;p=thirdparty%2Fgit.git diff --git a/run-command.c b/run-command.c index 2ee59acdc8..ea4d0fb4b1 100644 --- a/run-command.c +++ b/run-command.c @@ -7,6 +7,7 @@ #include "strbuf.h" #include "string-list.h" #include "quote.h" +#include "config.h" void child_process_init(struct child_process *child) { @@ -1868,8 +1869,13 @@ int run_processes_parallel_tr2(int n, get_next_task_fn get_next_task, int run_auto_maintenance(int quiet) { + int enabled; struct child_process maint = CHILD_PROCESS_INIT; + if (!git_config_get_bool("maintenance.auto", &enabled) && + !enabled) + return 0; + maint.git_cmd = 1; strvec_pushl(&maint.args, "maintenance", "run", "--auto", NULL); strvec_push(&maint.args, quiet ? "--quiet" : "--no-quiet");