aboutsummaryrefslogtreecommitdiff
path: root/help.c
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@frugalware.org>2008-07-31 00:38:07 +0200
committerJunio C Hamano <gitster@pobox.com>2008-07-30 21:38:18 -0700
commit6e4a86d2ed2d798c5462e5e324fefb8614be52a8 (patch)
tree6b7e7666f43569f0c18893a72ea3d7bef336f127 /help.c
parentdce61e728b89611109e76cbc9fa897fe49d7869d (diff)
downloadgit-6e4a86d2ed2d798c5462e5e324fefb8614be52a8.tar.gz
git-6e4a86d2ed2d798c5462e5e324fefb8614be52a8.tar.xz
builtin-help: always load_command_list() in cmd_help()
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>
Diffstat (limited to 'help.c')
-rw-r--r--help.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/help.c b/help.c
index 88c0d5b34..968f3683e 100644
--- a/help.c
+++ b/help.c
@@ -690,6 +690,7 @@ int cmd_help(int argc, const char **argv, const char *prefix)
{
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);
@@ -698,7 +699,6 @@ int cmd_help(int argc, const char **argv, const char *prefix)
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);