diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-05-13 22:19:19 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-05-13 22:19:19 +0300 |
commit | 3af459e48dd275665568f3a7a6d76d90c1843e6a (patch) | |
tree | 7c6dd38b823daf85193e2044a3f696ec9ad3c7fe /builtin/fetch.c | |
parent | aa28171c2752c0aa04c2e25f2f79bc01a7f045d5 (diff) | |
parent | 7c3e9e8cfbf6a8e45f4745049dc58f5c9e9d1eb9 (diff) |
Merge branch 'jc/auto-gc-quiet'
Teach "am", "commit", "merge" and "rebase", when they are run with
the "--quiet" option, to pass "--quiet" down to "gc --auto".
* jc/auto-gc-quiet:
auto-gc: pass --quiet down from am, commit, merge and rebase
auto-gc: extract a reusable helper from "git fetch"
Diffstat (limited to 'builtin/fetch.c')
-rw-r--r-- | builtin/fetch.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/builtin/fetch.c b/builtin/fetch.c index 95beed57fa..b5788c16bf 100644 --- a/builtin/fetch.c +++ b/builtin/fetch.c @@ -1753,7 +1753,6 @@ int cmd_fetch(int argc, const char **argv, const char *prefix) struct remote *remote = NULL; int result = 0; int prune_tags_ok = 1; - struct argv_array argv_gc_auto = ARGV_ARRAY_INIT; packet_trace_identity("fetch"); @@ -1880,13 +1879,8 @@ int cmd_fetch(int argc, const char **argv, const char *prefix) close_object_store(the_repository->objects); - if (enable_auto_gc) { - argv_array_pushl(&argv_gc_auto, "gc", "--auto", NULL); - if (verbosity < 0) - argv_array_push(&argv_gc_auto, "--quiet"); - run_command_v_opt(argv_gc_auto.argv, RUN_GIT_CMD); - argv_array_clear(&argv_gc_auto); - } + if (enable_auto_gc) + run_auto_gc(verbosity < 0); return result; } |