* jk/argv-array-for-child-process:
argv-array: drop "detach" code
get_importer: use run-command's internal argv_array
get_exporter: use argv_array
get_helper: use run-command's internal argv_array
git_connect: use argv_array
run_column_filter: use argv_array
run-command: store an optional argv_array
@ -109,6 +109,13 @@ terminated), of which .argv[0] is the program name to run (usually
@@ -109,6 +109,13 @@ terminated), of which .argv[0] is the program name to run (usually
without a path). If the command to run is a git command, set argv[0] to
the command name without the 'git-' prefix and set .git_cmd = 1.
Note that the ownership of the memory pointed to by .argv stays with the
caller, but it should survive until `finish_command` completes. If the
.argv member is NULL, `start_command` will point it at the .args
`argv_array` (so you may use one or the other, but you must use exactly
one). The memory in .args will be cleaned up automatically during
`finish_command` (or during `start_command` when it is unsuccessful).
The members .in, .out, .err are used to redirect stdin, stdout,
@ -245,7 +243,6 @@ static int disconnect_helper(struct transport *transport)
@@ -245,7 +243,6 @@ static int disconnect_helper(struct transport *transport)
close(data->helper->out);
fclose(data->out);
res = finish_command(data->helper);
argv_array_free_detached(data->helper->argv);
free(data->helper);
data->helper = NULL;
}
@ -397,18 +394,16 @@ static int get_importer(struct transport *transport, struct child_process *fasti
@@ -397,18 +394,16 @@ static int get_importer(struct transport *transport, struct child_process *fasti
@ -485,7 +474,6 @@ static int fetch_with_import(struct transport *transport,
@@ -485,7 +474,6 @@ static int fetch_with_import(struct transport *transport,
if (finish_command(&fastimport))
die("Error while running fast-import");
argv_array_free_detached(fastimport.argv);
/*
* The fast-import stream of a remote helper that advertises