aboutsummaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-06-21 14:42:38 -0700
committerJunio C Hamano <gitster@pobox.com>2012-06-21 14:42:38 -0700
commita88d7aaee8f8b80fdd2b70d38beb534b5102ee7c (patch)
treee71d6ec33d090f819c9df0786362bfdc804fee95 /builtin
parent1966babf6e8e5c67e2dec05aa00437246ded0497 (diff)
parent1cc8af044cad37b5f7df85b177f6aa979aa3215a (diff)
downloadgit-a88d7aaee8f8b80fdd2b70d38beb534b5102ee7c.tar.gz
git-a88d7aaee8f8b80fdd2b70d38beb534b5102ee7c.tar.xz
Merge branch 'vr/help-per-platform'
We used to always default to "man" format even on platforms where "man" viewer is not widely available. * vr/help-per-platform: help: use HTML as the default help format on Windows
Diffstat (limited to 'builtin')
-rw-r--r--builtin/help.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/builtin/help.c b/builtin/help.c
index 43d3c8444..536d4fd46 100644
--- a/builtin/help.c
+++ b/builtin/help.c
@@ -12,6 +12,10 @@
#include "column.h"
#include "help.h"
+#ifndef DEFAULT_HELP_FORMAT
+#define DEFAULT_HELP_FORMAT "man"
+#endif
+
static struct man_viewer_list {
struct man_viewer_list *next;
char name[FLEX_ARRAY];
@@ -445,7 +449,9 @@ 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)
+ if (parsed_help_format == HELP_FORMAT_NONE)
+ help_format = parse_help_format(DEFAULT_HELP_FORMAT);
+ else
help_format = parsed_help_format;
alias = alias_lookup(argv[0]);