[PATCH] Fix 'git help help'
- From
Miklos Vajna <vmiklos@frugalware.org>
- Date
- Aug 21, 2008, 14:21 UTC
- Message-ID
- <1219328508-11561-1-git-send-email-vmiklos@frugalware.org>
- In-Reply-To
- <200808210451.12795.chriscool@tuxfamily.org>
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> ---
On Thu, Aug 21, 2008 at 04:51:11AM +0200, Christian Couder <chriscool@tuxfamily.org> wrote:
> But unfortunately it seems that your patch hasn't been merged into > master, > so "git help help" is still broken there and in git 1.6.0.
Here is a patch for 'maint'.
help.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/help.c b/help.c index 3cb1962..dc0786d 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)
-- 1.6.0.rc3.17.gc14c8.dirty