summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorPat Thoyts <patthoyts@users.sourceforge.net>2012-06-22 13:48:46 +0100
committerJunio C Hamano <gitster@pobox.com>2012-06-22 11:06:08 -0700
commitd0408c0c8cd636233f01c0bda9ad71161609297c (patch)
tree9b72501172060c48dd9fa2618bc66286b713fa5f /builtin
parent1cc8af044cad37b5f7df85b177f6aa979aa3215a (diff)
downloadgit-d0408c0c8cd636233f01c0bda9ad71161609297c.tar.gz
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>
Diffstat (limited to 'builtin')
-rw-r--r--builtin/help.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin/help.c b/builtin/help.c
index 536d4fd463..8f9cd60548 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])) {