From: Junio C Hamano Date: Thu, 25 Apr 2019 07:41:14 +0000 (+0900) Subject: Merge branch 'js/difftool-no-index' X-Git-Tag: v2.22.0-rc0~67 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/b72e90712eb0e802b232ad4c88460d04279c7111 Merge branch 'js/difftool-no-index' "git difftool" can now run outside a repository. * js/difftool-no-index: difftool: allow running outside Git worktrees with --no-index parse-options: make OPT_ARGUMENT() more useful difftool: remove obsolete (and misleading) comment --- b72e90712eb0e802b232ad4c88460d04279c7111 diff --cc parse-options.h index 0f73787066,c3d45ba1ac..cc9230adac --- a/parse-options.h +++ b/parse-options.h @@@ -136,12 -136,10 +136,12 @@@ 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, \ - (h), PARSE_OPT_NOARG} + #define OPT_ARGUMENT(l, v, h) { OPTION_ARGUMENT, 0, (l), (v), NULL, \ + (h), PARSE_OPT_NOARG, NULL, 1 } #define OPT_GROUP(h) { OPTION_GROUP, 0, NULL, NULL, NULL, (h) } #define OPT_BIT(s, l, v, h, b) OPT_BIT_F(s, l, v, h, b, 0) #define OPT_BITOP(s, l, v, h, set, clear) { OPTION_BITOP, (s), (l), (v), NULL, (h), \