diff options
Diffstat (limited to 'run-command.c')
-rw-r--r-- | run-command.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/run-command.c b/run-command.c index 0f41af3b55..9b3a57d1e3 100644 --- a/run-command.c +++ b/run-command.c @@ -1864,3 +1864,16 @@ int run_processes_parallel_tr2(int n, get_next_task_fn get_next_task, return result; } + +int run_auto_gc(int quiet) +{ + struct argv_array argv_gc_auto = ARGV_ARRAY_INIT; + int status; + + argv_array_pushl(&argv_gc_auto, "gc", "--auto", NULL); + if (quiet) + argv_array_push(&argv_gc_auto, "--quiet"); + status = run_command_v_opt(argv_gc_auto.argv, RUN_GIT_CMD); + argv_array_clear(&argv_gc_auto); + return status; +} |