summaryrefslogtreecommitdiff
path: root/Documentation/technical/api-run-command.txt
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2014-10-19 11:13:55 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-10-19 22:26:31 (GMT)
commit19a583dc39e3e1110f746e837c5ce1953d6ebfa1 (patch)
tree6e16bc5612a97be1602c703a622dba52b55b3b56 /Documentation/technical/api-run-command.txt
parent98349e5364da6164add4ede3e63ceba2cc39159b (diff)
downloadgit-19a583dc39e3e1110f746e837c5ce1953d6ebfa1.zip
git-19a583dc39e3e1110f746e837c5ce1953d6ebfa1.tar.gz
git-19a583dc39e3e1110f746e837c5ce1953d6ebfa1.tar.bz2
run-command: add env_array, an optional argv_array for env
Similar to args, add a struct argv_array member to struct child_process that simplifies specifying the environment for children. It is freed automatically by finish_command() or if start_command() encounters an error. Suggested-by: Jeff King <peff@peff.net> Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/technical/api-run-command.txt')
-rw-r--r--Documentation/technical/api-run-command.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/Documentation/technical/api-run-command.txt b/Documentation/technical/api-run-command.txt
index 842b838..3f12fcd 100644
--- a/Documentation/technical/api-run-command.txt
+++ b/Documentation/technical/api-run-command.txt
@@ -169,6 +169,11 @@ string pointers (NULL terminated) in .env:
. If the string does not contain '=', it names an environment
variable that will be removed from the child process's environment.
+If the .env member is NULL, `start_command` will point it at the
+.env_array `argv_array` (so you may use one or the other, but not both).
+The memory in .env_array will be cleaned up automatically during
+`finish_command` (or during `start_command` when it is unsuccessful).
+
To specify a new initial working directory for the sub-process,
specify it in the .dir member.