From: Junio C Hamano Date: Mon, 27 Feb 2012 18:58:40 GMT Subject: Re: [PATCH 3/3] parse-options: remove PARSE_OPT_NEGHELP Message-ID: <7vpqd085nj.fsf@alter.siamese.dyndns.org> In-Reply-To: <20120227182504.GA1600@sigill.intra.peff.net> Jeff King writes: > ... Would it be > better to simply be explicit that an option is a reversed boolean (i.e., > what the user specifies on the command line and what is in the code are > naturally opposites). Like: > > OPT_REVERSE_BOOL(0, "no-index", &use_index, > "finds in contents not managed by git"), You said it much better than my attempt ;-). > Using NEGHELP, the "reverse" is between the option name and the > description, which is very subtle. Here it is between the option name > and the variable, which is hopefully a little more explicit (especially > with the big REVERSE in the macro name). > > I dunno. Given that there are only two uses of NEGHELP, and that they > don't come out too badly, I don't care _too_ much. But I have seen some > really tortured logic with double-negations like this, and I'm concerned > that a few months down the road somebody is going to want NEGHELP (or > something similar) in a case where it actually does really impact > readability. Yeah, I share a similar minor and iffy feeling about the result.