]> git.ipfire.org Git - thirdparty/git.git/blobdiff - parse-options.h
Merge branch 'en/ort-perf-batch-9'
[thirdparty/git.git] / parse-options.h
index 7030d8f3da6328cde9557f91cfd80ae60040cfd6..a845a9d9527476fbe5269756a7fd03aed6c6d4d7 100644 (file)
@@ -28,26 +28,27 @@ enum parse_opt_type {
 };
 
 enum parse_opt_flags {
-       PARSE_OPT_KEEP_DASHDASH = 1,
-       PARSE_OPT_STOP_AT_NON_OPTION = 2,
-       PARSE_OPT_KEEP_ARGV0 = 4,
-       PARSE_OPT_KEEP_UNKNOWN = 8,
-       PARSE_OPT_NO_INTERNAL_HELP = 16,
-       PARSE_OPT_ONE_SHOT = 32
+       PARSE_OPT_KEEP_DASHDASH = 1 << 0,
+       PARSE_OPT_STOP_AT_NON_OPTION = 1 << 1,
+       PARSE_OPT_KEEP_ARGV0 = 1 << 2,
+       PARSE_OPT_KEEP_UNKNOWN = 1 << 3,
+       PARSE_OPT_NO_INTERNAL_HELP = 1 << 4,
+       PARSE_OPT_ONE_SHOT = 1 << 5,
 };
 
 enum parse_opt_option_flags {
-       PARSE_OPT_OPTARG  = 1,
-       PARSE_OPT_NOARG   = 2,
-       PARSE_OPT_NONEG   = 4,
-       PARSE_OPT_HIDDEN  = 8,
-       PARSE_OPT_LASTARG_DEFAULT = 16,
-       PARSE_OPT_NODASH = 32,
-       PARSE_OPT_LITERAL_ARGHELP = 64,
-       PARSE_OPT_SHELL_EVAL = 256,
-       PARSE_OPT_NOCOMPLETE = 512,
-       PARSE_OPT_COMP_ARG = 1024,
-       PARSE_OPT_CMDMODE = 2048
+       PARSE_OPT_OPTARG  = 1 << 0,
+       PARSE_OPT_NOARG   = 1 << 1,
+       PARSE_OPT_NONEG   = 1 << 2,
+       PARSE_OPT_HIDDEN  = 1 << 3,
+       PARSE_OPT_LASTARG_DEFAULT = 1 << 4,
+       PARSE_OPT_NODASH = 1 << 5,
+       PARSE_OPT_LITERAL_ARGHELP = 1 << 6,
+       PARSE_OPT_FROM_ALIAS = 1 << 7,
+       PARSE_OPT_SHELL_EVAL = 1 << 8,
+       PARSE_OPT_NOCOMPLETE = 1 << 9,
+       PARSE_OPT_COMP_ARG = 1 << 10,
+       PARSE_OPT_CMDMODE = 1 << 11,
 };
 
 enum parse_opt_result {
@@ -82,9 +83,9 @@ typedef enum parse_opt_result parse_opt_ll_cb(struct parse_opt_ctx_t *ctx,
  *   stores pointers to the values to be filled.
  *
  * `argh`::
- *   token to explain the kind of argument this option wants. Keep it
- *   homogeneous across the repository. Should be wrapped by N_() for
- *   translation.
+ *   token to explain the kind of argument this option wants. Does not
+ *   begin in capital letter, and does not end with a full stop.
+ *   Should be wrapped by N_() for translation.
  *
  * `help`::
  *   the short help associated to what the option does.