From 4741edd549decfccc016fa4775b349fe94fdf4e5 Mon Sep 17 00:00:00 2001 From: Stefan Beller Date: Sat, 3 Aug 2013 13:51:18 +0200 Subject: Remove deprecated OPTION_BOOLEAN for parsing arguments As of b04ba2bb4 OPTION_BOOLEAN was deprecated. This commit removes all occurrences of OPTION_BOOLEAN. In b04ba2bb4 Junio suggested to replace it with either OPTION_SET_INT or OPTION_COUNTUP instead. However a pattern, which occurred often with the OPTION_BOOLEAN was a hidden boolean parameter. So I defined OPT_HIDDEN_BOOL as an additional possible parse option in parse-options.h to make life easy. The OPT_HIDDEN_BOOL was used in checkout, clone, commit, show-ref. The only exception, where there was need to fiddle with OPTION_SET_INT was log and notes. However in these two files there is also a pattern, so we could think of introducing OPT_NONEG_BOOL. Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- builtin/show-ref.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'builtin/show-ref.c') diff --git a/builtin/show-ref.c b/builtin/show-ref.c index 87806ad5b0..18680bbaeb 100644 --- a/builtin/show-ref.c +++ b/builtin/show-ref.c @@ -169,9 +169,8 @@ static const struct option show_ref_options[] = { OPT_BOOLEAN(0, "heads", &heads_only, N_("only show heads (can be combined with tags)")), OPT_BOOLEAN(0, "verify", &verify, N_("stricter reference checking, " "requires exact ref path")), - { OPTION_BOOLEAN, 'h', NULL, &show_head, NULL, - N_("show the HEAD reference, even if it would be filtered out"), - PARSE_OPT_NOARG | PARSE_OPT_HIDDEN }, + OPT_HIDDEN_BOOL('h', NULL, &show_head, + N_("show the HEAD reference, even if it would be filtered out")), OPT_BOOLEAN(0, "head", &show_head, N_("show the HEAD reference, even if it would be filtered out")), OPT_BOOLEAN('d', "dereference", &deref_tags, -- cgit v1.3