Add missing includes and forward declarations
[gitweb.git] / Documentation / technical / api-argv-array.txt
index 1a797812fb426189b03a814498dd7019c96607b4..870c8edbfb1d8ac538efee52dd321bdc48937477 100644 (file)
@@ -8,7 +8,7 @@ always NULL-terminated at the element pointed to by `argv[argc]`. This
 makes the result suitable for passing to functions expecting to receive
 argv from main(), or the link:api-run-command.html[run-command API].
 
-The link:api-string-list.html[string-list API] is similar, but cannot be
+The string-list API (documented in string-list.h) is similar, but cannot be
 used for these purposes; instead of storing a straight string pointer,
 it contains an item structure with a `util` field that is not compatible
 with the traditional argv interface.
@@ -46,6 +46,9 @@ Functions
        Format a string and push it onto the end of the array. This is a
        convenience wrapper combining `strbuf_addf` and `argv_array_push`.
 
+`argv_array_pushv`::
+       Push a null-terminated array of strings onto the end of the array.
+
 `argv_array_pop`::
        Remove the final element from the array. If there are no
        elements in the array, do nothing.
@@ -53,3 +56,10 @@ Functions
 `argv_array_clear`::
        Free all memory associated with the array and return it to the
        initial, empty state.
+
+`argv_array_detach`::
+       Disconnect the `argv` member from the `argv_array` struct and
+       return it. The caller is responsible for freeing the memory used
+       by the array, and by the strings it references. After detaching,
+       the `argv_array` is in a reinitialized state and can be pushed
+       into again.