Skip to content

Commit

Permalink
parse-options: clarify the limitations of PARSE_OPT_NODASH
Browse files Browse the repository at this point in the history
Update the comment documenting 'struct option' to clarify that
PARSE_OPT_NODASH can only be an argumentless short option; see
51a9949 (parseopt: add PARSE_OPT_NODASH, 2009-05-07).

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
szeder authored and gitster committed Aug 19, 2022
1 parent 99d86d6 commit a9126b9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion parse-options.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ typedef enum parse_opt_result parse_opt_ll_cb(struct parse_opt_ctx_t *ctx,
* is last on the command line. If the option is
* not last it will require an argument.
* Should not be used with PARSE_OPT_OPTARG.
* PARSE_OPT_NODASH: this option doesn't start with a dash.
* PARSE_OPT_NODASH: this option doesn't start with a dash; can only be a
* short option and can't accept arguments.
* PARSE_OPT_LITERAL_ARGHELP: says that argh shouldn't be enclosed in brackets
* (i.e. '<argh>') in the help message.
* Useful for options with multiple parameters.
Expand Down

0 comments on commit a9126b9

Please sign in to comment.