help.c: use puts() instead of printf{,_ln}() for consistency

Change code in "help.c" that used printf_ln() without format specifiers to use puts() instead, as other existing code in the file does. Let's also change related code to use puts() instead of the equivalent of calling "printf" with a "%s\n" format. This formatting-only change will make a subsequent functional change easier to read, as it'll be changing code that's consistently using the same functions to do the same things. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ævar Arnfjörð Bjarmason committed Feb 21, 2022 at 20:38 UTC cd87ce7d0def6b6efeb1ae688bde217a0a47c9eb
1 file changed +4 -3
help.c
+4 -3
@@ -124,7 +124,8 @@ static void print_cmd_by_category(const struct category_description *catdesc,
124 uint32_t mask = catdesc[i].category;
125 const char *desc = catdesc[i].desc;
126
127 - printf("\n%s\n", _(desc));
127 + putchar('\n');
128 + puts(_(desc));
129 print_command_list(cmds, mask, longest);
130 }
131 free(cmds);
@@ -317,7 +318,7 @@ void list_commands(struct cmdnames *main_cmds, struct cmdnames *other_cmds)
318 }
319
320 if (other_cmds->cnt) {
320 - printf_ln(_("git commands available from elsewhere on your $PATH"));
321 + puts(_("git commands available from elsewhere on your $PATH"));
322 putchar('\n');
323 pretty_print_cmdnames(other_cmds, colopts);
324 putchar('\n');
@@ -439,7 +440,7 @@ void list_all_cmds_help(void)
440 struct cmdname_help *aliases;
441 int i, longest;
442
442 - printf_ln(_("See 'git help <command>' to read about a specific subcommand"));
443 + puts(_("See 'git help <command>' to read about a specific subcommand"));
444 print_cmd_by_category(main_categories, &longest);
445
446 list_all_other_cmds(&others);