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

Re: [PATCH] help: Add a missing OPT_END().

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 2, 2008, 04:34 UTC
Message-ID
<7vk5jgan9e.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20080402034430.GA10360@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 7 quoted lines
> On Wed, Apr 02, 2008 at 05:47:41AM +0200, Christian Couder wrote:
>
>> 	Some comments in "parse-options.h" say it is needed,
>> 	though I did not see a crash without it.
>
> There was no particular reason I didn't put it in; I just didn't know
> about it. So ack from me, assuming it is supposed to be there.
parse-options.c::parse_short_opt() and parse_long_opt() has this loop:
	for (; options->type != OPTION_END; options++) {
		...
	}

So whatever happens to come after builtin_help_options[] may be read from by this loop when you do not have OPTION_END.

Previous: Jeff King
Message 3 of 3 in “help: Add a missing OPT_END().”
  1. help: Add a missing OPT_END().Christian Couder, Apr 2, 2008
  2. Jeff KingApr 2, 2008
  3. Junio C HamanoApr 2, 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.