From: Pranit Bauva Date: Sat, 19 Mar 2016 04:55:09 GMT Subject: Re: [PATCH v8 1/2] parse-options.c: make OPTION__COUNTUP consider negative values Message-ID: In-Reply-To: On Sat, Mar 19, 2016 at 4:29 AM, Junio C Hamano wrote: > Pranit Bauva writes: > >> The reason to make it consider negative values or more specifically >> "unspecified" values is to give the ability to differentiate between >> once, multiple time or with --no-option. >> >> Eg. : >> initialize verbose = -1 >> `git commit` => verbose = -1 >> `git commit -v` => verbose = 1 >> `git commit -v -v` => verbose = 2 >> `git commit --no-verbose` => verbose = 0 > > A few more things I noticed about this are: > > - Many uses of COUNTUP has now been replaced with BOOL and what > remains are verbose/quiet/force. > > - This change will not affect existing users of COUNTUP at all, as > long as they use the initial value of 0 (or more), as there is no > mechanism to decrement. The only thing the command line can do > is to reset it to zero with "--no-foo". > > So it seems a safe and sensible change. Even though I suspect that > the justification can be written more clearly, I am not sure if it > worth the extra effort. I can include this paragraph. Some people might have a bit difficulty in knowing the importance as they might not have followed my earlier patches. To bridge this gap, I can include your paragraph in the commit message. Any other particular things you want me to justify? I will be glad to send another re-roll of this. Regards, Pranit Bauva