diff options
author | Junio C Hamano <gitster@pobox.com> | 2014-06-16 10:06:10 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-06-16 10:06:10 -0700 |
commit | 5b3a58d459171f49ee8d486e4ac399eb2678605d (patch) | |
tree | 86a262d494e9c2d741ef210bd7f8e7aa5e0fdf7c /Documentation/technical | |
parent | 45dc2927168cd9575a8ea81e78f6f5c39cb653f4 (diff) | |
parent | ff857e4ee8680af3988aff3383b1158f396a6fb2 (diff) | |
download | git-5b3a58d459171f49ee8d486e4ac399eb2678605d.tar.gz |
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/technical')
-rw-r--r-- | Documentation/technical/api-argv-array.txt | 8 | ||||
-rw-r--r-- | Documentation/technical/api-run-command.txt | 7 |
2 files changed, 7 insertions, 8 deletions
diff --git a/Documentation/technical/api-argv-array.txt b/Documentation/technical/api-argv-array.txt index a6b7d83a8e..1a797812fb 100644 --- a/Documentation/technical/api-argv-array.txt +++ b/Documentation/technical/api-argv-array.txt @@ -53,11 +53,3 @@ Functions `argv_array_clear`:: Free all memory associated with the array and return it to the initial, empty state. - -`argv_array_detach`:: - Detach the argv array from the `struct argv_array`, transferring - ownership of the allocated array and strings. - -`argv_array_free_detached`:: - 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 5d7d7f2d32..69510ae57a 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: |