Re: parse-options does not recognize "unspecified" behavior

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 16, 2016 at 2:44 PM, Jeff King <peff@xxxxxxxx> wrote:
> On Wed, Mar 16, 2016 at 05:37:03PM -0400, Eric Sunshine wrote:
>
>> A much easier solution would be to update OPT_VERBOSE() to understand
>> that negative values are "unspecified", and then --verbose would
>> (pseudocode):
>>
>>     if (value < 0)
>>         value = 0
>>     value++;
>>
>> and --no-verbose would:
>>
>>     value = 0
>>
>> That should be compatible with existing clients of OPT__VERBOSE()
>> which initialize the value to 0, and should satisfy Pranit's case; he
>> can initialize it to -1, and if it is still -1 when option parsing is
>> done, then he knows that neither --verbose nor --no-verbose was seen.
>
> Yes, that makes much more sense to me. Thanks for the back-story.
>
> -Peff

Is there any command which needs more than one --no-verbose?
(as an abuse to stacking --quiet multiple times)?
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]