diff options
| -rw-r--r-- | builtin/gc.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/builtin/gc.c b/builtin/gc.c index 77d0a5c948..8f568003ee 100644 --- a/builtin/gc.c +++ b/builtin/gc.c @@ -1011,6 +1011,13 @@ int cmd_gc(int argc, if (opts.detach <= 0 && !skip_foreground_tasks) gc_foreground_tasks(&opts, &cfg); + if (cfg.prune_worktrees_expire && + maintenance_task_worktree_prune(&opts, &cfg)) + die(FAILED_RUN, "worktree"); + + if (maintenance_task_rerere_gc(&opts, &cfg)) + die(FAILED_RUN, "rerere"); + if (!the_repository->repository_format_precious_objects) { struct child_process repack_cmd = CHILD_PROCESS_INIT; @@ -1038,13 +1045,6 @@ int cmd_gc(int argc, } } - if (cfg.prune_worktrees_expire && - maintenance_task_worktree_prune(&opts, &cfg)) - die(FAILED_RUN, "worktree"); - - if (maintenance_task_rerere_gc(&opts, &cfg)) - die(FAILED_RUN, "rerere"); - report_garbage = report_pack_garbage; odb_reprepare(the_repository->objects); if (pack_garbage.nr > 0) { |
