@matheusbsbs / matheus-bagliano / commits / 26463c8f7c
Fork 0

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 <vmiklos@frugalware.org> Acked-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Miklos Vajna committed Aug 21, 2008 at 16:21 UTC 26463c8f7ca1d54a480ea9baf0d98da2b6454204
1 file changed +2 -1
help.c
+2 -1
@@ -555,7 +555,8 @@ static int is_git_command(const char *s)
555 {
556 load_command_list();
557 return is_in_cmdlist(&main_cmds, s) ||
558 - is_in_cmdlist(&other_cmds, s);
558 + is_in_cmdlist(&other_cmds, s) ||
559 + !strcmp(s, "help");
560 }
561
562 static const char *prepend(const char *prefix, const char *cmd)