summaryrefslogtreecommitdiff
path: root/builtin/merge.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2020-05-06 13:18:30 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-05-07 12:24:35 -0700
commit7c3e9e8cfbf6a8e45f4745049dc58f5c9e9d1eb9 (patch)
tree7ef59d5576f2e737e04a951af58ab06545a83cb3 /builtin/merge.c
parentauto-gc: extract a reusable helper from "git fetch" (diff)
downloadtgif-7c3e9e8cfbf6a8e45f4745049dc58f5c9e9d1eb9.tar.xz
auto-gc: pass --quiet down from am, commit, merge and rebase
These commands take the --quiet option for their own operation, but they forget to pass the option down when they invoke "git gc --auto" internally. Teach them to do so using the run_auto_gc() helper we added in the previous step. Signed-off-by: Junio C Hamano <gitster@pobox.com> Reviewed-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/merge.c')
-rw-r--r--builtin/merge.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/builtin/merge.c b/builtin/merge.c
index d127d2225f..c66b9b532c 100644
--- a/builtin/merge.c
+++ b/builtin/merge.c
@@ -447,7 +447,6 @@ static void finish(struct commit *head_commit,
if (verbosity >= 0 && !merge_msg.len)
printf(_("No merge message -- not updating HEAD\n"));
else {
- const char *argv_gc_auto[] = { "gc", "--auto", NULL };
update_ref(reflog_message.buf, "HEAD", new_head, head,
0, UPDATE_REFS_DIE_ON_ERR);
/*
@@ -455,7 +454,7 @@ static void finish(struct commit *head_commit,
* user should see them.
*/
close_object_store(the_repository->objects);
- run_command_v_opt(argv_gc_auto, RUN_GIT_CMD);
+ run_auto_gc(verbosity < 0);
}
}
if (new_head && show_diffstat) {