Re: [PATCH 3/7] builtin-help: make list_commands() a bit more generic
On Sat, 26 Jul 2008, Miklos Vajna wrote:
Show 13 quoted lines
> -static void list_commands(void)
> +void list_commands(const char *prefix, const char *title)
> {
> - unsigned int longest = load_command_list(NULL);
> + unsigned int longest = load_command_list(prefix);
> const char *exec_path = git_exec_path();
>
> if (main_cmds.cnt) {
> - printf("available git commands in '%s'\n", exec_path);
> + printf("available %s in '%s'\n", title, exec_path);
> printf("----------------------------");
> mput_char('-', strlen(exec_path));
> putchar('\n');Should this be
printf("available %s in '%s'\n", title, exec_path);
printf("----------------");
mput_char('-', strlen(exec_path) + strlen(title));
putchar('\n');?
(same question goes for the if(other_cmds.cnt) block, too)