]> git.ipfire.org Git - thirdparty/git.git/blobdiff - run-command.c
config.mak.uname: remove unused NEEDS_SSL_WITH_CURL flag
[thirdparty/git.git] / run-command.c
index cc9c3296ba0cbb852300d7d5ccb3d6f29f931034..2ee59acdc8c828ad81ccb7526bd7f23fc460d095 100644 (file)
@@ -1866,15 +1866,13 @@ int run_processes_parallel_tr2(int n, get_next_task_fn get_next_task,
        return result;
 }
 
-int run_auto_gc(int quiet)
+int run_auto_maintenance(int quiet)
 {
-       struct strvec argv_gc_auto = STRVEC_INIT;
-       int status;
+       struct child_process maint = CHILD_PROCESS_INIT;
 
-       strvec_pushl(&argv_gc_auto, "gc", "--auto", NULL);
-       if (quiet)
-               strvec_push(&argv_gc_auto, "--quiet");
-       status = run_command_v_opt(argv_gc_auto.v, RUN_GIT_CMD);
-       strvec_clear(&argv_gc_auto);
-       return status;
+       maint.git_cmd = 1;
+       strvec_pushl(&maint.args, "maintenance", "run", "--auto", NULL);
+       strvec_push(&maint.args, quiet ? "--quiet" : "--no-quiet");
+
+       return run_command(&maint);
 }