Skip to content

Commit 26463c8

Browse files
Miklos Vajnagitster
authored andcommitted
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 <[email protected]> Acked-by: Christian Couder <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent a81892d commit 26463c8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

help.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,8 @@ static int is_git_command(const char *s)
555555
{
556556
load_command_list();
557557
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");
559560
}
560561

561562
static const char *prepend(const char *prefix, const char *cmd)

0 commit comments

Comments
 (0)