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

Re: [PATCH] git-help: Try to find html pages without the git- prefix

From
Christian Couder <chriscool@tuxfamily.org>
Date
Apr 29, 2008, 03:13 UTC
Message-ID
<200804290513.40948.chriscool@tuxfamily.org>
In-Reply-To
<1209377611-90005-1-git-send-email-pdebie@ai.rug.nl>
Le lundi 28 avril 2008, Pieter de Bie a écrit :
> Some html documentation does not have the git- prefix, for example
> hooks.html. If the git-command.html page does not exist, try to find the
> command.html file. This allows commands like `git help -w hooks' to work
Yes, this works fine for html documentation.

But 'git help -w githooks' could work fine too, if the source filename was "githooks.txt" instead of "hooks.txt". Because the "cmd_to_page" function returns its input as is, if it starts with "git".

And with more filenames like "githooks.txt" we could also have more "githooks" like regular man pages without poluting too much the man page namespace.

We already have the following files following that scheme:

gitk.txt gitattributes.txt gitignore.txt gitcli.txt gitmodules.txt git.txt

And for example the following commands are already working:

$ git help -w gitmodules $ git help -m gitmodules $ man gitmodules

("git help -i gitmodules" should work too, but info format help seems broken.)

Of course typing "git help hooks" is shorter and simpler than "git help githooks", so it could perhaps still be a good idea to try "gitXXX" as a fallback if we find nothing for "git-XXX".

Thanks, Christian.

Previous: Pieter de BieNext: Junio C Hamano
Message 2 of 4 in “git-help: Try to find html pages without the git- prefix”
  1. git-help: Try to find html pages without the git- prefixPieter de Bie, Apr 28, 2008
  2. Christian CouderApr 29, 2008
  3. Junio C HamanoApr 29, 2008
  4. Christian CouderApr 29, 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.