git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[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
Previous: Christian CouderNext: Christian Couder
Message 11 of 13 in “git help broken”
  1. Kevin BallardJul 30, 2008
  2. builtin-help: always load_command_list() in cmd_help()Miklos Vajna, Jul 30, 2008
  3. Kevin BallardJul 30, 2008
  4. Johannes SchindelinJul 30, 2008
  5. Johannes SchindelinJul 30, 2008
  6. Miklos VajnaJul 31, 2008
  7. Christian CouderAug 1, 2008
  8. Miklos VajnaAug 1, 2008
  9. Builtin git-help.Miklos Vajna, Aug 2, 2008
  10. Christian CouderAug 21, 2008
  11. Fix 'git help help'Miklos Vajna, Aug 21, 2008
  12. Christian CouderAug 22, 2008
  13. Kevin BallardJul 30, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.