Skip to content

Commit

Permalink
doc: add documentation for OPT_STRING_LIST
Browse files Browse the repository at this point in the history
Commit c8ba163 ("parse-options: add OPT_STRING_LIST helper",
2011-06-09) added the OPT_STRING_LIST as a way to accumulate a repeated
list of strings. However, this was not documented in the
api-parse-options documentation. Add documentation now so that future
developers may learn of its existence.

Signed-off-by: Jacob Keller <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
  • Loading branch information
jacob-keller authored and gitster committed Jan 19, 2017
1 parent 454cb6b commit 4a68748
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Documentation/technical/api-parse-options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,11 @@ There are some macros to easily define options:
Introduce an option with string argument.
The string argument is put into `str_var`.

`OPT_STRING_LIST(short, long, &struct string_list, arg_str, description)`::
Introduce an option with string argument.
The string argument is stored as an element in `string_list`.
Use of `--no-option` will clear the list of preceding values.

`OPT_INTEGER(short, long, &int_var, description)`::
Introduce an option with integer argument.
The integer is put into `int_var`.
Expand Down

0 comments on commit 4a68748

Please sign in to comment.