aboutsummaryrefslogtreecommitdiffstats
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-09-14 11:16:58 -0700
committerJunio C Hamano <gitster@pobox.com>2023-09-14 11:16:58 -0700
commitd4cab3717f1afb6d0f423fa7b1cd87b657c507e3 (patch)
tree817946666b833973724c4304df353faf80d27dac /builtin
parentMerge branch 'rs/grep-parseopt-simplify' (diff)
parentname-rev: use OPT_HIDDEN_BOOL for --peel-tag (diff)
downloadgit-d4cab3717f1afb6d0f423fa7b1cd87b657c507e3.tar.gz
git-d4cab3717f1afb6d0f423fa7b1cd87b657c507e3.zip
Merge branch 'rs/name-rev-use-opt-hidden-bool'
Simplify use of parse-options API a bit. * rs/name-rev-use-opt-hidden-bool: name-rev: use OPT_HIDDEN_BOOL for --peel-tag
Diffstat (limited to 'builtin')
-rw-r--r--builtin/name-rev.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/builtin/name-rev.c b/builtin/name-rev.c
index c706fa3720..2dd1807c4e 100644
--- a/builtin/name-rev.c
+++ b/builtin/name-rev.c
@@ -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(),
};