diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-05-06 13:18:30 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-05-07 12:24:35 -0700 |
commit | 7c3e9e8cfbf6a8e45f4745049dc58f5c9e9d1eb9 (patch) | |
tree | 7ef59d5576f2e737e04a951af58ab06545a83cb3 /builtin/commit.c | |
parent | auto-gc: extract a reusable helper from "git fetch" (diff) | |
download | tgif-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/commit.c')
-rw-r--r-- | builtin/commit.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/builtin/commit.c b/builtin/commit.c index 7ba33a3bec..fa8eca623e 100644 --- a/builtin/commit.c +++ b/builtin/commit.c @@ -1488,7 +1488,6 @@ static int git_commit_config(const char *k, const char *v, void *cb) int cmd_commit(int argc, const char **argv, const char *prefix) { - const char *argv_gc_auto[] = {"gc", "--auto", NULL}; static struct wt_status s; static struct option builtin_commit_options[] = { OPT__QUIET(&quiet, N_("suppress summary after successful commit")), @@ -1697,7 +1696,7 @@ int cmd_commit(int argc, const char **argv, const char *prefix) return 1; repo_rerere(the_repository, 0); - run_command_v_opt(argv_gc_auto, RUN_GIT_CMD); + run_auto_gc(quiet); run_commit_hook(use_editor, get_index_file(), "post-commit", NULL); if (amend && !no_post_rewrite) { commit_post_rewrite(the_repository, current_head, &oid); |