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

Re: [PATCH] Restore use of 'help.format' configuration property in 'git help'

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 22, 2012, 18:06 UTC
Message-ID
<7vy5nfp6fu.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1340369326-1840-1-git-send-email-patthoyts@users.sourceforge.net>
Pat Thoyts <patthoyts@users.sourceforge.net> writes:
Show 5 quoted lines
> Commit 1cc8af0 "help: use HTML as the default help format on Windows"
> lost the ability to make use of the help.format config value by forcing
> the use of a compiled in default if no command-line argument was provided.
> This commit restores the use of the help.format value if one is
> available, overriding the compiled default.
Of course.  Sorry for not catching it earlier.
Show 24 quoted lines
>
> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
> ---
>  builtin/help.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/builtin/help.c b/builtin/help.c
> index 536d4fd..8f9cd60 100644
> --- a/builtin/help.c
> +++ b/builtin/help.c
> @@ -449,10 +449,10 @@ int cmd_help(int argc, const char **argv, const char *prefix)
>  	setup_git_directory_gently(&nongit);
>  	git_config(git_help_config, NULL);
>  
> -	if (parsed_help_format == HELP_FORMAT_NONE)
> -		help_format = parse_help_format(DEFAULT_HELP_FORMAT);
> -	else
> +	if (parsed_help_format != HELP_FORMAT_NONE)
>  		help_format = parsed_help_format;
> +	if (help_format == HELP_FORMAT_NONE)
> +		help_format = parse_help_format(DEFAULT_HELP_FORMAT);
>  
>  	alias = alias_lookup(argv[0]);
>  	if (alias && !is_git_command(argv[0])) {
Previous: Pat ThoytsNext: Vincent van Ravesteijn
Message 2 of 3 in “Restore use of 'help.format' configuration property in 'git help'”
  1. Restore use of 'help.format' configuration property in 'git help'Pat Thoyts, Jun 22, 2012
  2. Junio C HamanoJun 22, 2012
  3. Vincent van RavesteijnJun 23, 2012

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.