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

Re: [PATCH] revisions: refactor handle_revision_opt into parse_revision_opt.

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 10, 2008, 07:36 UTC
Message-ID
<7vfxqiqjgd.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20080710071418.GD3195@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 9 quoted lines
> but it also seems like the top bit of that for loop is boilerplate, too:
>
>>  	for (;;) {
>>  		switch (parse_options_step(&ctx, options, shortlog_usage)) {
>>  		case PARSE_OPT_HELP:
>>  			exit(129);
>>  		case PARSE_OPT_DONE:
>>  			goto parse_done;
>>  		}

Another thing we should be able to refactor is the option help formatter. Cf. 071438a (Teach git-merge -X<option> again., 2008-07-09)

Previous: Pierre Habouzit
Message 6 of 6 in “git-shortlog: migrate to parse-options partially.”
  1. git-shortlog: migrate to parse-options partially.Pierre Habouzit, Jul 9, 2008
  2. revisions: refactor handle_revision_opt into parse_revision_opt.Pierre Habouzit, Jul 9, 2008
  3. Jeff KingJul 10, 2008
  4. Pierre HabouzitJul 10, 2008
  5. Pierre HabouzitJul 10, 2008
  6. Junio C HamanoJul 10, 2008

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.