Re: [PATCH] parse-options: warn developers on negated options

2017-09-06 Thread Junio C Hamano
Stefan Beller writes: >> Ahh, I was an idiot (call it vacation-induced-brain-disfunction). I >> forgot about 0f1930c5 ("parse-options: allow positivation of options >> starting, with no-", 2012-02-25), which may have already made your >> new use of "--no-verify" in

Re: [PATCH] parse-options: warn developers on negated options

2017-09-06 Thread Stefan Beller
On Tue, Sep 5, 2017 at 8:16 PM, Junio C Hamano wrote: > Junio C Hamano writes: > >> Stefan Beller writes: >> >>> This patch disallows all no- options, but we could be more open and allow >>> --no-options that have the NO_NEG bit set.

Re: [PATCH] parse-options: warn developers on negated options

2017-09-05 Thread Junio C Hamano
Junio C Hamano writes: > Stefan Beller writes: > >> This patch disallows all no- options, but we could be more open and allow >> --no-options that have the NO_NEG bit set. > > "--no-foo" that does not take "--foo" is perhaps OK so should not > trigger

Re: [PATCH] parse-options: warn developers on negated options

2017-09-05 Thread Junio C Hamano
Stefan Beller writes: > This patch disallows all no- options, but we could be more open and allow > --no-options that have the NO_NEG bit set. "--no-foo" that does not take "--foo" is perhaps OK so should not trigger an error. A ("--no-foo", "--foo") pair is better

[PATCH] parse-options: warn developers on negated options

2017-09-05 Thread Stefan Beller
When compiling with -DDEVELOPER set (enabled via the Makefile DEVELOPER switch), inspect options if they are negated and warn about them. 1. Negated options are usually are problem down the maintenance road: When a new negated option ("--no-foo") is introduced, then the option can be