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

Re: [PATCH 2/3] git-help: add -w|--web option to display html man page in a browser.

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 6, 2007, 17:05 UTC
Message-ID
<7vve7bda8y.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20071202060755.4d6d5ec8.chriscool@tuxfamily.org>
Christian Couder <chriscool@tuxfamily.org> writes:
Show 19 quoted lines
> diff --git a/help.c b/help.c
> index 0f1cb71..ecc8c66 100644
> --- a/help.c
> +++ b/help.c
> @@ -297,7 +303,14 @@ int cmd_help(int argc, const char **argv, const char *prefix)
>  	const char *help_cmd = argc > 1 ? argv[1] : NULL;
>  	check_help_cmd(help_cmd);
>  
> -	if (!strcmp(help_cmd, "--info") || !strcmp(help_cmd, "-i")) {
> +	if (!strcmp(help_cmd, "--web") || !strcmp(help_cmd, "-w")) {
> +		help_cmd = argc > 2 ? argv[2] : NULL;
> +		check_help_cmd(help_cmd);
> +
> +		show_html_page(help_cmd);
> +	}
> +
> +	else if (!strcmp(help_cmd, "--info") || !strcmp(help_cmd, "-i")) {
>  		help_cmd = argc > 2 ? argv[2] : NULL;
>  		check_help_cmd(help_cmd);
Isn't this "check-help-cmd" duplication ugly, by the way?
Previous: Christian CouderNext: Junio C Hamano
Message 7 of 8 in “git-help: add -w|--web option to display html man page in a browser.”
  1. 2/3 git-help: add -w|--web option to display html man page in a browser.Christian Couder, Dec 2, 2007
  2. Junio C HamanoDec 6, 2007
  3. Christian CouderDec 7, 2007
  4. Junio C HamanoDec 7, 2007
  5. Junio C HamanoDec 7, 2007
  6. Christian CouderDec 8, 2007
  7. Junio C HamanoDec 6, 2007
  8. Junio C HamanoDec 8, 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.