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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ævar Arnfjörð Bjarmason  <avarab@xxxxxxxxx> 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.




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux