aboutsummaryrefslogtreecommitdiff
path: root/help.c
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@frugalware.org>2008-08-21 16:21:48 +0200
committerJunio C Hamano <gitster@pobox.com>2008-08-21 22:18:21 -0700
commit26463c8f7ca1d54a480ea9baf0d98da2b6454204 (patch)
tree4e0550a0f4faf426dfea2c10a9d69164ad4beb25 /help.c
parenta81892dd8c37b6f13793739721b520fee3ce4c2c (diff)
downloadgit-26463c8f7ca1d54a480ea9baf0d98da2b6454204.tar.gz
git-26463c8f7ca1d54a480ea9baf0d98da2b6454204.tar.xz
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>
Diffstat (limited to 'help.c')
-rw-r--r--help.c3
1 files changed, 2 insertions, 1 deletions
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)