[PATCH] Fix 'git help help'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---

On Thu, Aug 21, 2008 at 04:51:11AM +0200, Christian Couder <chriscool@xxxxxxxxxxxxx> 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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux