argv-array: implement argv_array_pushv()

When we have a null-terminated array, it would be useful to convert it
or append it to an argv_array for further manipulation.

Implement argv_array_pushv() which will push a null-terminated array of
strings on to an argv_array.

Signed-off-by: Paul Tan <pyokagan@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Paul Tan
2015-06-14 16:41:50 +08:00
committed by Junio C Hamano
parent ffad85c599
commit 85b343245b
3 changed files with 10 additions and 0 deletions

View File

@ -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.