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

Re: msysgit, help: teach git help to open html from /doc/git/html/

From
Steffen Prohaska <prohaska@zib.de>
Date
Aug 12, 2007, 10:49 UTC
Message-ID
<F4A816A8-4139-45BD-9A86-EFB1DFE251E7@zib.de>
In-Reply-To
<fcaeb9bf0708111716y29d6a719r995304b96c1b3eb2@mail.gmail.com>
On Aug 12, 2007, at 2:16 AM, Nguyen Thai Ngoc Duy wrote:
Show 14 quoted lines
> On 8/11/07, Nguyen Thai Ngoc Duy <pclouds@gmail.com> wrote:
>> This reminds me a patch I made before:
>>
>> http://thread.gmane.org/gmane.comp.version-control.git/49217/ 
>> focus=49575
>
> And the second patch:
>
> http://article.gmane.org/gmane.comp.version-control.git/49216
>
>> With a little modification you can use ShellExecute to open html if
>> there is no suitable program to open it. The last commit on
>> mingw.git's mob branch does that (not based on my mentioned patch
>> though).
So we have three approached now:
1) Nguyen's approach using '--html'/core.help=html to explicitly
choose html as the format of choice. The core.htmlprogram is used
and a printf style format string can be used to specify required
command line parameters.
2) Junio's light-weight core.helpcmd, which gets passed the string
that would normally be passed to 'man'. Helpcmd needs to figure
out how to do the right thing. Most likely helpcmd would be a
small shell script that does the mapping to a file or url for
displaying the help. But it can also be a more complex thing,
for example load a Windows chm file and jump to a specific anchor,
or whatsoever.
3) Steffen's msysgit specific code path to display always locally
installed html pages on Windows, and never display 'man' pages.
 From my perspective, (3) would be the fastest way to get a useful
git help in msysgit. It only needs to be applied and shipped. But
it provides no benefit for git.git on other architectures.

(2) is a very light-weight extension to core git, yet capable of providing everything we need, or can think of in the future. It makes sense to me to delegate the details how to find the help, based on the git command, to an external helper.

Maybe I work a bit more on Junio's approach later the day. I would like to see a useful help system in msysgit before advertising it to a larger audience that has no git experience.

	Steffen
Previous: Nguyen Thai Ngoc Duy
Message 6 of 6 in “msysgit, help: teach git help to open html from /doc/git/html/”
  1. Steffen ProhaskaAug 11, 2007
  2. Junio C HamanoAug 11, 2007
  3. Steffen ProhaskaAug 11, 2007
  4. Nguyen Thai Ngoc DuyAug 12, 2007
  5. Nguyen Thai Ngoc DuyAug 12, 2007
  6. Steffen ProhaskaAug 12, 2007

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.