Skip to content

Commit

Permalink
Restore use of 'help.format' configuration property in 'git help'
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Pat Thoyts authored and Junio C Hamano committed Jun 22, 2012
1 parent 1cc8af0 commit d0408c0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions builtin/help.c
Original file line number Diff line number Diff line change
Expand Up @@ -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])) {
Expand Down

0 comments on commit d0408c0

Please sign in to comment.