git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] fetch: convert argv_gc_auto to struct argv_array
@ 2014-08-14 11:51 Nguyễn Thái Ngọc Duy
  2014-08-14 11:51 ` [PATCH 2/2] fetch: silence git-gc if --quiet is given Nguyễn Thái Ngọc Duy
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Nguyễn Thái Ngọc Duy @ 2014-08-14 11:51 UTC (permalink / raw)
  To: git; +Cc: mflaschen, Nguyễn Thái Ngọc Duy

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
 builtin/fetch.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/builtin/fetch.c b/builtin/fetch.c
index e8d0cca..9394194 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,8 @@ 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);
 
 	return result;
 }
-- 
2.1.0.rc0.78.gc0d8480

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-08-16  1:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-14 11:51 [PATCH 1/2] fetch: convert argv_gc_auto to struct argv_array Nguyễn Thái Ngọc Duy
2014-08-14 11:51 ` [PATCH 2/2] fetch: silence git-gc if --quiet is given Nguyễn Thái Ngọc Duy
2014-08-14 19:56   ` Jeff King
2014-08-15 12:09     ` Duy Nguyen
2014-08-14 19:53 ` [PATCH 1/2] fetch: convert argv_gc_auto to struct argv_array Jeff King
2014-08-16  1:19 ` [PATCH v2 " Nguyễn Thái Ngọc Duy
2014-08-16  1:19   ` [PATCH v2 2/2] fetch: silence git-gc if --quiet is given Nguyễn Thái Ngọc Duy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).