From: Miklos Vajna Date: Thu, 21 Aug 2008 14:21:48 +0000 (+0200) Subject: Fix 'git help help' X-Git-Tag: v1.6.0.1~10 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=26463c8f7ca1d54a480ea9baf0d98da2b6454204;p=git.git Fix 'git help help' 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 Acked-by: Christian Couder Signed-off-by: Junio C Hamano --- diff --git a/help.c b/help.c index 3cb196289..dc0786d80 100644 --- a/help.c +++ b/help.c @@ -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)