]> git.ipfire.org Git - thirdparty/git.git/commitdiff
parse-options.h: rename _OPT_CONTAINS_OR_WITH()'s parameters
authorSZEDER Gábor <szeder.dev@gmail.com>
Sun, 19 Mar 2023 16:56:47 +0000 (17:56 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 20 Mar 2023 19:04:06 +0000 (12:04 -0700)
Rename the 'help' parameter as it matches one of the fields in 'struct
option', and, while at it, rename all other parameters to the usual
one-letter name used in similar macro definitions.

Furthermore, put all parameters in the replacement list between
parentheses, like all other OPT_* macros do.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Reviewed-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
parse-options.h

index 34f8caf369576dafc6d7f4b2f318953e62433333..7e99322bab147a5d0880f3342da18214186e592b 100644 (file)
@@ -381,9 +381,9 @@ int parse_opt_tracking_mode(const struct option *, const char *, int);
        { OPTION_CALLBACK, (s), (l), (v), (a), (h), (f), parse_opt_passthru }
 #define OPT_PASSTHRU_ARGV(s, l, v, a, h, f) \
        { OPTION_CALLBACK, (s), (l), (v), (a), (h), (f), parse_opt_passthru_argv }
-#define _OPT_CONTAINS_OR_WITH(name, variable, help, flag) \
-       { OPTION_CALLBACK, 0, name, (variable), N_("commit"), (help), \
-         PARSE_OPT_LASTARG_DEFAULT | flag, \
+#define _OPT_CONTAINS_OR_WITH(l, v, h, f) \
+       { OPTION_CALLBACK, 0, (l), (v), N_("commit"), (h), \
+         PARSE_OPT_LASTARG_DEFAULT | (f), \
          parse_opt_commits, (intptr_t) "HEAD" \
        }
 #define OPT_CONTAINS(v, h) _OPT_CONTAINS_OR_WITH("contains", v, h, PARSE_OPT_NONEG)