Skip to content

Commit

Permalink
Fix 'git help help'
Browse files Browse the repository at this point in the history
git help foo invokes man git-foo if foo is a git command, otherwise it
invokes man gitfoo. 'help' is not a git command, but the manual page is
called git-help, so add this special exception.

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Acked-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Miklos Vajna authored and Junio C Hamano committed Aug 22, 2008
1 parent a81892d commit 26463c8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion help.c
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,8 @@ static int is_git_command(const char *s)
{
load_command_list();
return is_in_cmdlist(&main_cmds, s) ||
is_in_cmdlist(&other_cmds, s);
is_in_cmdlist(&other_cmds, s) ||
!strcmp(s, "help");
}

static const char *prepend(const char *prefix, const char *cmd)
Expand Down

0 comments on commit 26463c8

Please sign in to comment.