mirror of
https://github.com/git/git.git
synced 2024-11-27 20:14:30 +08:00
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>
This commit is contained in:
parent
6c4ab27f23
commit
1991006cb9
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user