Skip to content

Commit f76827d

Browse files
committed
Merge branch 'rs/name-rev-use-opt-hidden-bool' into maint-2.42
Simplify use of parse-options API a bit. * rs/name-rev-use-opt-hidden-bool: name-rev: use OPT_HIDDEN_BOOL for --peel-tag
2 parents 2fdfd75 + 078c425 commit f76827d

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

builtin/name-rev.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -582,12 +582,8 @@ int cmd_name_rev(int argc, const char **argv, const char *prefix)
582582
OPT_BOOL(0, "undefined", &allow_undefined, N_("allow to print `undefined` names (default)")),
583583
OPT_BOOL(0, "always", &always,
584584
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)")),
591587
OPT_END(),
592588
};
593589

0 commit comments

Comments
 (0)