Skip to content

Commit d0408c0

Browse files
patthoytsgitster
authored andcommitted
Restore use of 'help.format' configuration property in 'git help'
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. Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 1cc8af0 commit d0408c0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

builtin/help.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -449,10 +449,10 @@ int cmd_help(int argc, const char **argv, const char *prefix)
449449
setup_git_directory_gently(&nongit);
450450
git_config(git_help_config, NULL);
451451

452-
if (parsed_help_format == HELP_FORMAT_NONE)
453-
help_format = parse_help_format(DEFAULT_HELP_FORMAT);
454-
else
452+
if (parsed_help_format != HELP_FORMAT_NONE)
455453
help_format = parsed_help_format;
454+
if (help_format == HELP_FORMAT_NONE)
455+
help_format = parse_help_format(DEFAULT_HELP_FORMAT);
456456

457457
alias = alias_lookup(argv[0]);
458458
if (alias && !is_git_command(argv[0])) {

0 commit comments

Comments
 (0)