diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2014-08-16 08:19:27 +0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-08-18 10:14:08 -0700 |
commit | 1991006cb9c84ec11de8a5ebf9e419f0ac1f00d0 (patch) | |
tree | be87429b570b1e4001cedd2bb9c9d8af8a896e78 | |
parent | 6c4ab27f2378ce67940b4496365043119d7ffff2 (diff) | |
download | git-1991006cb9c84ec11de8a5ebf9e419f0ac1f00d0.tar.gz |
fetch: convert argv_gc_auto to struct argv_array
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r-- | builtin/fetch.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/builtin/fetch.c b/builtin/fetch.c index e8d0cca3e4..5f06114218 100644 --- a/builtin/fetch.c +++ b/builtin/fetch.c @@ -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"); @@ -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; } |