Re: [PATCH] push: unset PARSE_OPT_OPTARG for --recurse-submodules
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 27, 2020, 18:54 UTC
- Message-ID
- <xmqq7dy092tq.fsf@gitster.c.googlers.com>
- In-Reply-To
- <20200427120225.GB1718141@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 9 quoted lines
>> @@ -554,7 +552,7 @@ int cmd_push(int argc, const char **argv, const char *prefix)
>> PARSE_OPT_OPTARG | PARSE_OPT_LITERAL_ARGHELP, parseopt_push_cas_option },
>> { OPTION_CALLBACK, 0, "recurse-submodules", &recurse_submodules, "(check|on-demand|no)",
>> N_("control recursive pushing of submodules"),
>> - PARSE_OPT_OPTARG, option_parse_recurse_submodules },
>> + 0, option_parse_recurse_submodules },
>
> This could collapse down to OPT_CALLBACK() now, though I don't think
> it's a big deal either way.I would prefer to see OPT_CALLBACK() used; it would send a strong signal that this place is using the canned bog-standard and boring pattern, and nothing fancy is going on.
Thanks.