Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
fetch: convert argv_gc_auto to struct argv_array
author
Nguyễn Thái Ngọc Duy
<pclouds@gmail.com>
Sat, 16 Aug 2014 01:19:27 +0000
(08:19 +0700)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 18 Aug 2014 17:14:08 +0000
(10:14 -0700)
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/fetch.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
6c4ab27
)
diff --git
a/builtin/fetch.c
b/builtin/fetch.c
index e8d0cca3e4110e1ae6db82f21c899c44460cb849..5f06114218d6b4a23d26ad525d9312f4b91a78dc 100644
(file)
--- 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;
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");
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);
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;
}
return result;
}