Merge branch 'mg/rebase-i-onto-reflog-in-full'
[gitweb.git] / builtin / help.c
index 0c698b18c8467a284c223d1e7e395d31f03352fd..efea4f55e173a5ff2d7e1748316d6a94266e915a 100644 (file)
 #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];
@@ -458,6 +462,8 @@ int cmd_help(int argc, const char **argv, const char *prefix)
 
        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])) {