Thread (1 message) 1 message, 1 author, 2016-06-15

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:44:27

Jeff King [off-list ref] writes:
On Wed, Apr 02, 2008 at 05:47:41AM +0200, Christian Couder wrote:
quoted
	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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help