Skip to content

Commit

Permalink
Merge branch 'nd/fetch-pass-quiet-to-gc-child-process' into maint
Browse files Browse the repository at this point in the history
* nd/fetch-pass-quiet-to-gc-child-process:
  fetch: silence git-gc if --quiet is given
  fetch: convert argv_gc_auto to struct argv_array
  • Loading branch information
gitster committed Sep 19, 2014
2 parents fb6f843 + 6fceed3 commit 08fd8a0
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions builtin/fetch.c
Original file line number Diff line number Diff line change
Expand Up @@ -1110,9 +1110,7 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)
struct string_list list = STRING_LIST_INIT_NODUP;
struct remote *remote;
int result = 0;
static const char *argv_gc_auto[] = {
"gc", "--auto", NULL,
};
struct argv_array argv_gc_auto = ARGV_ARRAY_INIT;

packet_trace_identity("fetch");

Expand Down Expand Up @@ -1198,7 +1196,11 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)
list.strdup_strings = 1;
string_list_clear(&list, 0);

run_command_v_opt(argv_gc_auto, RUN_GIT_CMD);
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);

return result;
}

0 comments on commit 08fd8a0

Please sign in to comment.