name-rev: use OPT_HIDDEN_BOOL for --peel-tag

adfc1857bd (describe: fix --contains when a tag is given as input, 2013-07-18) added the option --peel-tag, defining it using a positional struct option initializer and a comment indicating that it's intended to be a hidden OPT_BOOL. 4741edd549 (Remove deprecated OPTION_BOOLEAN for parsing arguments, 2013-08-03) added the macro OPT_HIDDEN_BOOL, which allows to express this more succinctly. Use it. Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>

René Scharfe committed Sep 2, 2023 at 20:38 UTC 078c42531e8d6e8c7bfaa1a52dca330f0eef5d94
1 file changed +2 -6
builtin/name-rev.c
+2 -6
@@ -582,12 +582,8 @@ int cmd_name_rev(int argc, const char **argv, const char *prefix)
582 OPT_BOOL(0, "undefined", &allow_undefined, N_("allow to print `undefined` names (default)")),
583 OPT_BOOL(0, "always", &always,
584 N_("show abbreviated commit object as fallback")),
585 - {
586 - /* A Hidden OPT_BOOL */
587 - OPTION_SET_INT, 0, "peel-tag", &peel_tag, NULL,
588 - N_("dereference tags in the input (internal use)"),
589 - PARSE_OPT_NOARG | PARSE_OPT_HIDDEN, NULL, 1,
590 - },
585 + OPT_HIDDEN_BOOL(0, "peel-tag", &peel_tag,
586 + N_("dereference tags in the input (internal use)")),
587 OPT_END(),
588 };
589