summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: dce61e7)
raw | patch | inline | side by side (parent: dce61e7)
author | Miklos Vajna <vmiklos@frugalware.org> | |
Wed, 30 Jul 2008 22:38:07 +0000 (00:38 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 31 Jul 2008 04:38:18 +0000 (21:38 -0700) |
When cmd_help() is called, we always need the list of main and other
commands, not just when the list of all commands is shown. Before this
patch 'git help diff' invoked 'man gitdiff' because cmd_to_page()
thought 'diff' is not a git command.
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
commands, not just when the list of all commands is shown. Before this
patch 'git help diff' invoked 'man gitdiff' because cmd_to_page()
thought 'diff' is not a git command.
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
help.c | patch | blob | history |
index 88c0d5b34046550009686acb527bea7beef0e578..968f3683ed071dc2793dce296d84bd078be043c6 100644 (file)
--- a/help.c
+++ b/help.c
{
int nongit;
const char *alias;
+ unsigned int longest = load_command_list("git-", &main_cmds, &other_cmds);
setup_git_directory_gently(&nongit);
git_config(git_help_config, NULL);
builtin_help_usage, 0);
if (show_all) {
- unsigned int longest = load_command_list("git-", &main_cmds, &other_cmds);
printf("usage: %s\n\n", git_usage_string);
list_commands("git commands", longest, &main_cmds, &other_cmds);
printf("%s\n", git_more_info_string);