diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-04-25 16:41:12 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-04-25 16:41:12 +0900 |
commit | dcd6a8c09a36a500c4e612a52eba1c6c5e298951 (patch) | |
tree | 79ed79645190bf1c49996f2b9aec5e349eb96400 /parse-options.h | |
parent | Merge branch 'jk/unused-params-even-more' (diff) | |
parent | am: avoid diff_opt_parse() (diff) | |
download | tgif-dcd6a8c09a36a500c4e612a52eba1c6c5e298951.tar.xz |
Merge branch 'nd/diff-parseopt-4'
Fourth batch to teach the diff machinery to use the parse-options
API.
* nd/diff-parseopt-4:
am: avoid diff_opt_parse()
diff --no-index: use parse_options() instead of diff_opt_parse()
range-diff: use parse_options() instead of diff_opt_parse()
diff.c: allow --no-color-moved-ws
diff-parseopt: convert --color-moved-ws
diff-parseopt: convert --[no-]color-moved
diff-parseopt: convert --inter-hunk-context
diff-parseopt: convert --no-prefix
diff-parseopt: convert --line-prefix
diff-parseopt: convert --[src|dst]-prefix
diff-parseopt: convert --[no-]abbrev
diff-parseopt: convert --diff-filter
diff-parseopt: convert --find-object
diff-parseopt: convert -O
diff-parseopt: convert --pickaxe-all|--pickaxe-regex
diff-parseopt: convert -S|-G
diff-parseopt: convert -l
diff-parseopt: convert -z
diff-parseopt: convert --ita-[in]visible-in-index
diff-parseopt: convert --ws-error-highlight
Diffstat (limited to 'parse-options.h')
-rw-r--r-- | parse-options.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/parse-options.h b/parse-options.h index 74cce4e7fc..0f73787066 100644 --- a/parse-options.h +++ b/parse-options.h @@ -136,6 +136,8 @@ struct option { #define OPT_BOOL_F(s, l, v, h, f) OPT_SET_INT_F(s, l, v, h, 1, f) #define OPT_CALLBACK_F(s, l, v, a, h, f, cb) \ { OPTION_CALLBACK, (s), (l), (v), (a), (h), (f), (cb) } +#define OPT_STRING_F(s, l, v, a, h, f) { OPTION_STRING, (s), (l), (v), (a), (h), (f) } +#define OPT_INTEGER_F(s, l, v, h, f) { OPTION_INTEGER, (s), (l), (v), N_("n"), (h), (f) } #define OPT_END() { OPTION_END } #define OPT_ARGUMENT(l, h) { OPTION_ARGUMENT, 0, (l), NULL, NULL, \ @@ -154,10 +156,10 @@ struct option { (h), PARSE_OPT_NOARG | PARSE_OPT_HIDDEN, NULL, 1} #define OPT_CMDMODE(s, l, v, h, i) { OPTION_CMDMODE, (s), (l), (v), NULL, \ (h), PARSE_OPT_NOARG|PARSE_OPT_NONEG, NULL, (i) } -#define OPT_INTEGER(s, l, v, h) { OPTION_INTEGER, (s), (l), (v), N_("n"), (h) } +#define OPT_INTEGER(s, l, v, h) OPT_INTEGER_F(s, l, v, h, 0) #define OPT_MAGNITUDE(s, l, v, h) { OPTION_MAGNITUDE, (s), (l), (v), \ N_("n"), (h), PARSE_OPT_NONEG } -#define OPT_STRING(s, l, v, a, h) { OPTION_STRING, (s), (l), (v), (a), (h) } +#define OPT_STRING(s, l, v, a, h) OPT_STRING_F(s, l, v, a, h, 0) #define OPT_STRING_LIST(s, l, v, a, h) \ { OPTION_CALLBACK, (s), (l), (v), (a), \ (h), 0, &parse_opt_string_list } |