path: root/argv-array.h
diff options
authorJeff King <>2012-09-01 11:25:27 (GMT)
committerJunio C Hamano <>2012-09-03 04:10:01 (GMT)
commitfe4a0a288842e225f99254b3e6ce14ff98875501 (patch)
treec8bb6378525ac176e76472dcc58666a708845d78 /argv-array.h
parent9e234af281107d44116ecf31eef65de145c46d15 (diff)
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 <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'argv-array.h')
1 files changed, 1 insertions, 0 deletions
diff --git a/argv-array.h b/argv-array.h
index b93a69c..f4b9866 100644
--- a/argv-array.h
+++ b/argv-array.h
@@ -16,6 +16,7 @@ void argv_array_push(struct argv_array *, const char *);
__attribute__((format (printf,2,3)))
void argv_array_pushf(struct argv_array *, const char *fmt, ...);
void argv_array_pushl(struct argv_array *, ...);
+void argv_array_pop(struct argv_array *);
void argv_array_clear(struct argv_array *);
#endif /* ARGV_ARRAY_H */