From: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
To: git@vger.kernel.org
Cc: mflaschen@wikimedia.org, "Jeff King" <peff@peff.net>,
"Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Subject: [PATCH v2 1/2] fetch: convert argv_gc_auto to struct argv_array
Date: Sat, 16 Aug 2014 08:19:27 +0700 [thread overview]
Message-ID: <1408151968-30294-1-git-send-email-pclouds@gmail.com> (raw)
In-Reply-To: <1408017065-17437-1-git-send-email-pclouds@gmail.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
builtin/fetch.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/builtin/fetch.c b/builtin/fetch.c
index e8d0cca..5f06114 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;
}
--
2.1.0.rc0.78.gc0d8480
next prev parent reply other threads:[~2014-08-16 1:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Nguyễn Thái Ngọc Duy [this message]
2014-08-16 1:19 ` [PATCH v2 2/2] fetch: silence git-gc if --quiet is given Nguyễn Thái Ngọc Duy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1408151968-30294-1-git-send-email-pclouds@gmail.com \
--to=pclouds@gmail.com \
--cc=git@vger.kernel.org \
--cc=mflaschen@wikimedia.org \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.