Re: [PATCH/RFC] parse-options.c: make OPTION__COUNTUP consider negative values

2016-03-20 Thread Pranit Bauva
On Sun, Mar 20, 2016 at 9:40 AM, Jeff King wrote: >> > We are also changing semantics without changing the interface, which >> > means any topics in flight (that you _cannot_ review, because you have >> > not seen them yet) may be subtly broken. To me that is not an absolute >> >

Re: [PATCH/RFC] parse-options.c: make OPTION__COUNTUP consider negative values

2016-03-19 Thread Jeff King
On Fri, Mar 18, 2016 at 04:53:34PM +0530, Pranit Bauva wrote: > > And we would need to verify that all of the existing callers are OK with > > this. Did you check that that (not rhetorical; I suspect they are all > > OK, but somebody needs to check)? > > I did a grep on parse-options.h and saw

Re: [PATCH/RFC] parse-options.c: make OPTION__COUNTUP consider negative values

2016-03-19 Thread Jeff King
On Wed, Mar 16, 2016 at 11:16:58PM +, Pranit Bauva wrote: > The reason to make it consider negative values or more specifically > "unspecified" values is to differentiate between the option passed > once, multiple times or with --no-option. This makes the receiver > know what actually

Re: [PATCH/RFC] parse-options.c: make OPTION__COUNTUP consider negative values

2016-03-19 Thread Pranit Bauva
Sorry for a little late reply. I was under the impression that I had replied before. On Thu, Mar 17, 2016 at 7:20 AM, Jeff King wrote: > That aside, this patch does mean that one can no longer use > OPT_COUNTUP() for negative values (i.e., the caller must start it at > either 0

Re: [PATCH/RFC] parse-options.c: make OPTION__COUNTUP consider negative values

2016-03-19 Thread Eric Sunshine
On Wed, Mar 16, 2016 at 9:50 PM, Jeff King wrote: > On Wed, Mar 16, 2016 at 11:16:58PM +, Pranit Bauva wrote: >> The reason to make it consider negative values or more specifically >> "unspecified" values is to differentiate between the option passed >> once, multiple times or

Re: [PATCH/RFC] parse-options.c: make OPTION__COUNTUP consider negative values

2016-03-19 Thread Eric Sunshine
On Thu, Mar 17, 2016 at 3:28 AM, Eric Sunshine wrote: > I also realized that Pranit can achieve the desired behavior without > modifying OPT__VERBOSE at all. Specifically, rather than initializing > his opt_verbose variable to -1, he can instead initialize it to 1. >

[PATCH/RFC] parse-options.c: make OPTION__COUNTUP consider negative values

2016-03-19 Thread Pranit Bauva
The reason to make it consider negative values or more specifically "unspecified" values is to differentiate between the option passed once, multiple times or with --no-option. This makes the receiver know what actually happened with the arguments which is particularly required with option have

Re: [PATCH/RFC] parse-options.c: make OPTION__COUNTUP consider negative values

2016-03-18 Thread Pranit Bauva
On Thu, Mar 17, 2016 at 12:58 PM, Eric Sunshine wrote: > On Wed, Mar 16, 2016 at 9:50 PM, Jeff King wrote: >> On Wed, Mar 16, 2016 at 11:16:58PM +, Pranit Bauva wrote: >>> The reason to make it consider negative values or more specifically >>>