Subject: Re: [PATCH 1/2] fetch: convert argv_gc_auto to struct argv_array

From: Jeff King <[email-masked]>
Date: Thu, 14 Aug 2014 15:53:20 -0400

On Thu, Aug 14, 2014 at 06:51:04PM +0700, Nguyễn Thái Ngọc Duy wrote:

> -	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);

argv_array_clear() here afterwards?

Not a huge deal since we are about to exit, but in the name of
good hygiene.

-Peff