Skip to content

Commit

Permalink
fetch: convert argv_gc_auto to struct argv_array
Browse files Browse the repository at this point in the history
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Nguyễn Thái Ngọc Duy authored and Junio C Hamano committed Aug 18, 2014
1 parent 6c4ab27 commit 1991006
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 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,9 @@ 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);
run_command_v_opt(argv_gc_auto.argv, RUN_GIT_CMD);
argv_array_clear(&argv_gc_auto);

return result;
}

0 comments on commit 1991006

Please sign in to comment.