path: root/Documentation
diff options
authorJunio C Hamano <>2014-06-16 17:06:10 (GMT)
committerJunio C Hamano <>2014-06-16 17:06:10 (GMT)
commit5b3a58d459171f49ee8d486e4ac399eb2678605d (patch)
tree86a262d494e9c2d741ef210bd7f8e7aa5e0fdf7c /Documentation
parent45dc2927168cd9575a8ea81e78f6f5c39cb653f4 (diff)
parentff857e4ee8680af3988aff3383b1158f396a6fb2 (diff)
Merge branch 'jk/argv-array-for-child-process'
* 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
Diffstat (limited to 'Documentation')
2 files changed, 7 insertions, 8 deletions
diff --git a/Documentation/technical/api-argv-array.txt b/Documentation/technical/api-argv-array.txt
index a6b7d83..1a79781 100644
--- a/Documentation/technical/api-argv-array.txt
+++ b/Documentation/technical/api-argv-array.txt
@@ -53,11 +53,3 @@ Functions
Free all memory associated with the array and return it to the
initial, empty state.
- Detach the argv array from the `struct argv_array`, transferring
- ownership of the allocated array and strings.
- Free the memory allocated by a `struct argv_array` that was later
- detached and is now no longer needed.
diff --git a/Documentation/technical/api-run-command.txt b/Documentation/technical/api-run-command.txt
index 5d7d7f2..69510ae 100644
--- a/Documentation/technical/api-run-command.txt
+++ b/Documentation/technical/api-run-command.txt
@@ -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,
stderr as follows: