From: Junio C Hamano Date: Mon, 25 May 2009 07:59:29 +0000 (-0700) Subject: Merge branch 'sb/show-branch-parse-options' into sb/opt-filename X-Git-Tag: v1.6.4-rc0~94^2~4 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=b064e2fc3d197c3c691fe89c43d1bf79f64fcdf7;p=git.git Merge branch 'sb/show-branch-parse-options' into sb/opt-filename * sb/show-branch-parse-options: show-branch: migrate to parse-options API parse-options: add PARSE_OPT_LITERAL_ARGHELP for complicated argh's Conflicts: parse-options.h --- b064e2fc3d197c3c691fe89c43d1bf79f64fcdf7 diff --cc parse-options.h index 919b9b441,910aa1e9f..fe41ab2c6 --- a/parse-options.h +++ b/parse-options.h @@@ -33,7 -31,7 +33,8 @@@ enum parse_opt_option_flags PARSE_OPT_NONEG = 4, PARSE_OPT_HIDDEN = 8, PARSE_OPT_LASTARG_DEFAULT = 16, + PARSE_OPT_NODASH = 32, + PARSE_OPT_LITERAL_ARGHELP = 64, }; struct option; @@@ -67,11 -65,11 +68,14 @@@ typedef int parse_opt_cb(const struct o * PARSE_OPT_OPTARG: says that the argument is optional (not for BOOLEANs) * PARSE_OPT_NOARG: says that this option takes no argument, for CALLBACKs * PARSE_OPT_NONEG: says that this option cannot be negated - * PARSE_OPT_HIDDEN this option is skipped in the default usage, showed in - * the long one. + * PARSE_OPT_HIDDEN: this option is skipped in the default usage, and + * shown only in the full usage. + * PARSE_OPT_LASTARG_DEFAULT: if no argument is given, the default value + * is used. + * PARSE_OPT_NODASH: this option doesn't start with a dash. + * PARSE_OPT_LITERAL_ARGHELP: says that argh shouldn't be enclosed in brackets + * (i.e. '') in the help message. + * Useful for options with multiple parameters. * * `callback`:: * pointer to the callback to use for OPTION_CALLBACK.