Subject: Re: [PATCH 02/11] config-batch: create parse loop and unknown command

From: Junio C Hamano <[email-masked]>
Date: Wed, 04 Feb 2026 15:26:13 -0800

"Derrick Stolee via GitGitGadget" <[email-masked]> writes:

> +static struct command commands[] = {
> +	/* unknown_command must be last. */
> +	{
> +		.name = "",
> +		.fn   = unknown_command,
> +	},
> +};

A useful trick is to deliberately omit the trailing comma after the
element that MUST be last.  You did that for the __NR enum element
in a later step.

> +#define COMMAND_COUNT ((size_t)(sizeof(commands) / sizeof(*commands)))

Isn't this ARRAY_SIZE(commands)?

> +	while (!(res = process_command(repo)));

Please write an empty statement on its own line, i.e.

	while (!(res = process_command(repo)))
		;