From: Junio C Hamano Date: Sun, 31 May 2009 23:17:58 +0000 (-0700) Subject: Merge branch 'sb/show-branch-parse-options' X-Git-Tag: v1.6.4-rc0~96 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c6e73936b9ea26fcad0d77d68194545082343c43;p=git.git Merge branch 'sb/show-branch-parse-options' * 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 --- c6e73936b9ea26fcad0d77d68194545082343c43 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.