help.c: rename function "pretty_print_string_list"
The part "string_list" of the name of function "pretty_print_string_list" is just an implementation detail. The function pretty-prints command names so rename it to "pretty_print_cmdnames". Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
7bbc4e8fdb
commit
d10cb3dfab
7
help.c
7
help.c
@ -78,8 +78,7 @@ void exclude_cmds(struct cmdnames *cmds, struct cmdnames *excludes)
|
|||||||
cmds->cnt = cj;
|
cmds->cnt = cj;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void pretty_print_string_list(struct cmdnames *cmds,
|
static void pretty_print_cmdnames(struct cmdnames *cmds, unsigned int colopts)
|
||||||
unsigned int colopts)
|
|
||||||
{
|
{
|
||||||
struct string_list list = STRING_LIST_INIT_NODUP;
|
struct string_list list = STRING_LIST_INIT_NODUP;
|
||||||
struct column_options copts;
|
struct column_options copts;
|
||||||
@ -209,14 +208,14 @@ void list_commands(unsigned int colopts,
|
|||||||
const char *exec_path = git_exec_path();
|
const char *exec_path = git_exec_path();
|
||||||
printf_ln(_("available git commands in '%s'"), exec_path);
|
printf_ln(_("available git commands in '%s'"), exec_path);
|
||||||
putchar('\n');
|
putchar('\n');
|
||||||
pretty_print_string_list(main_cmds, colopts);
|
pretty_print_cmdnames(main_cmds, colopts);
|
||||||
putchar('\n');
|
putchar('\n');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (other_cmds->cnt) {
|
if (other_cmds->cnt) {
|
||||||
printf_ln(_("git commands available from elsewhere on your $PATH"));
|
printf_ln(_("git commands available from elsewhere on your $PATH"));
|
||||||
putchar('\n');
|
putchar('\n');
|
||||||
pretty_print_string_list(other_cmds, colopts);
|
pretty_print_cmdnames(other_cmds, colopts);
|
||||||
putchar('\n');
|
putchar('\n');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user