Re: [PATCH 1/4] parse-options: convert "command mode" to a flag
- From
Paolo Bonzini <pbonzini@redhat.com>
- Date
- Feb 19, 2020, 21:05 UTC
- Message-ID
- <ea9395db-b39a-358f-df8e-b28907193415@redhat.com>
- In-Reply-To
- <xmqqzhdee6c6.fsf@gitster-ct.c.googlers.com>
On 19/02/20 20:15, Junio C Hamano wrote:
Show 12 quoted lines
>> OPTION_CMDMODE is essentially OPTION_SET_INT plus the extra check >> that the variable had not set before. In order to allow custom >> processing, change it to OPTION_SET_INT plus a new flag that takes >> care of the check. This works as long as the option value points >> to an int. > It is unclear but I am guessing that the purpose of this change is > to make "only one of these" orthgonal to "the value of this option > is an int", in preparation to allow options other than SET_INT to > also be combined with "only one of these"? > > If my reading is not correct, that would be an indication that the > above paragraph does not tell what it wants to to readers.
Your reading and your conclusion are both correct. I'll reword the commit message.
Paolo
> It is unclear at this step what other kind of option the flag wants > to be combined, though. >