Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15

Re: [PATCH] Remove deprecated OPTION_BOOLEAN

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:58:16

Stefan Beller [off-list ref] writes:
As of b04ba2bb4 OPTION_BOOLEAN was deprecated.
The primary purpose of b04ba2bb (parse-options: deprecate
OPT_BOOLEAN, 2011-09-27) is to deprecate OPT_BOOLEAN(), which was
hard to use correctly.

OPT_BOOLEAN() is not touched at all with this patch, it seems.  Do
they want count-up semantics?
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 <redacted>
At first glance, it looked to me that OPT_HIDDEN_BOOL was a good
addition, given how often we have PARSE_OPT_HIDDEN.  While I think
some of the hidden ones are justified, I am not sure if the hiding
of many options are.  If we stop hiding many of them, HIDDEN_BOOL
may become not so useful.  I dunno.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help