summaryrefslogtreecommitdiff
path: root/Documentation/technical/api-argv-array.txt
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2012-09-01 07:25:27 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2012-09-02 21:10:01 -0700
commitfe4a0a288842e225f99254b3e6ce14ff98875501 (patch)
treec8bb6378525ac176e76472dcc58666a708845d78 /Documentation/technical/api-argv-array.txt
parentMerge branch 'jk/repack-no-explode-objects-from-old-pack' (diff)
downloadtgif-fe4a0a288842e225f99254b3e6ce14ff98875501.tar.xz
argv-array: add pop function
Sometimes we build a set of similar command lines, differing only in the final arguments (e.g., "fetch --multiple"). To use argv_array for this, you have to either push the same set of elements repeatedly, or break the abstraction by manually manipulating the array's internal members. Instead, let's provide a sanctioned "pop" function to remove elements from the end. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/technical/api-argv-array.txt')
-rw-r--r--Documentation/technical/api-argv-array.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/Documentation/technical/api-argv-array.txt b/Documentation/technical/api-argv-array.txt
index 1b7d8f140c..1a797812fb 100644
--- a/Documentation/technical/api-argv-array.txt
+++ b/Documentation/technical/api-argv-array.txt
@@ -46,6 +46,10 @@ 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_pop`::
+ Remove the final element from the array. If there are no
+ elements in the array, do nothing.
+
`argv_array_clear`::
Free all memory associated with the array and return it to the
initial, empty state.