]> rtime.felk.cvut.cz Git - git.git/commitdiff
Merge branch 'sb/show-branch-parse-options'
authorJunio C Hamano <gitster@pobox.com>
Sun, 31 May 2009 23:17:58 +0000 (16:17 -0700)
committerJunio C Hamano <gitster@pobox.com>
Sun, 31 May 2009 23:17:58 +0000 (16:17 -0700)
* 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

1  2 
parse-options.c
parse-options.h

diff --cc parse-options.c
Simple merge
diff --cc parse-options.h
index 919b9b441f97511695308287a2fdc6f3a45e383d,910aa1e9f1827f119fb445e281e02235e6f99df3..fe41ab2c67024b91794c483c2436e33e205f5f62
@@@ -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. '<argh>') in the help message.
+  *                            Useful for options with multiple parameters.
   *
   * `callback`::
   *   pointer to the callback to use for OPTION_CALLBACK.