Skip to content

Commit

Permalink
Merge branch 'rs/name-rev-use-opt-hidden-bool' into next
Browse files Browse the repository at this point in the history
Simplify use of parse-options API a bit.

* rs/name-rev-use-opt-hidden-bool:
  name-rev: use OPT_HIDDEN_BOOL for --peel-tag
  • Loading branch information
gitster committed Sep 6, 2023
2 parents 249b69c + 078c425 commit 9b251a5
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions builtin/name-rev.c
Original file line number Diff line number Diff line change
Expand Up @@ -582,12 +582,8 @@ int cmd_name_rev(int argc, const char **argv, const char *prefix)
OPT_BOOL(0, "undefined", &allow_undefined, N_("allow to print `undefined` names (default)")),
OPT_BOOL(0, "always", &always,
N_("show abbreviated commit object as fallback")),
{
/* A Hidden OPT_BOOL */
OPTION_SET_INT, 0, "peel-tag", &peel_tag, NULL,
N_("dereference tags in the input (internal use)"),
PARSE_OPT_NOARG | PARSE_OPT_HIDDEN, NULL, 1,
},
OPT_HIDDEN_BOOL(0, "peel-tag", &peel_tag,
N_("dereference tags in the input (internal use)")),
OPT_END(),
};

Expand Down

0 comments on commit 9b251a5

Please sign in to comment.