git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.
Previous: Jeff KingNext: Denton Liu
Message 4 of 9 in “Bug v2.23.0: command help for 'git push --recurse-submodules' is incorrect”
  1. Andrew WhiteApr 27, 2020
  2. push: unset PARSE_OPT_OPTARG for --recurse-submodulesDenton Liu, Apr 27, 2020
  3. Jeff KingApr 27, 2020
  4. Junio C HamanoApr 27, 2020
  5. Use OPT_CALLBACK and OPT_CALLBACK_FDenton Liu, Apr 28, 2020
  6. Jeff KingApr 28, 2020
  7. Junio C HamanoApr 28, 2020
  8. Junio C HamanoApr 28, 2020
  9. Denton LiuApr 28, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.