Subject: Re: [PATCH v2 2/9] help.c: use puts() instead of printf{,_ln}() for consistency

From: Junio C Hamano <[email-masked]>
Date: Wed, 23 Feb 2022 13:51:08 -0800

Ævar Arnfjörð Bjarmason  <[email-masked]> writes:

> -		printf("\n%s\n", _(desc));
> +		putchar('\n');
> +		puts(_(desc));

This is sort of "Meh".  Even the justification that says "we'll do
the same thing in future patches" is not really a justification, as
it is entirely fine to add more of the "line-break plus %\n" printf()
in the later steps in the same series.

>  		print_command_list(cmds, mask, longest);
>  	}
>  	free(cmds);
> @@ -317,7 +318,7 @@ void list_commands(struct cmdnames *main_cmds, struct cmdnames *other_cmds)
>  	}
>  
>  	if (other_cmds->cnt) {
> -		printf_ln(_("git commands available from elsewhere on your $PATH"));
> +		puts(_("git commands available from elsewhere on your $PATH"));

This *IS* an improvement, as the first parameter to printf_ln() is
supposed to be a format string, and should have been

	printf_ln("%s", _("git commands ..."));

> -	printf_ln(_("See 'git help <command>' to read about a specific subcommand"));
> +	puts(_("See 'git help <command>' to read about a specific subcommand"));

Ditto.