Re: [PATCH 1/2] bisect--helper: use OPT_CMDMODE instead of OPT_BOOL
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 4, 2016, 07:28 UTC
- Message-ID
- <xmqqbn4mjn8q.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <CAPig+cQxpZXKqykFoa2kzCZSC2YqpPXnGocs2YttcJ+rCxmzgQ@mail.gmail.com>
Eric Sunshine <sunshine@sunshineco.com> writes:
Show 13 quoted lines
>> +enum sub_commands {
>
> How about calling this 'enum subcommand' (no underscore, non-plural)?
>
>> + NEXT_ALL = 1
>> +};
>> +
>> int cmd_bisect__helper(int argc, const char **argv, const char *prefix)
>> {
>> - int next_all = 0;
>> + int sub_command = 0;
>
> s/sub_command/subcommand/Non-plural is a good suggestion, but remember that you are using OPT_CMDMODE to parse out that thing. There is already a name for that concept: "command name". Why not name these after that phrase, just like merge-base, replace, and tag already do?