help: search html documentation relativ to git_exec_dir()

Global gitconfig and templates are searched relativ
to git_exec_dir() to make the installation relocatable.

This commit changes help to do the same for finding
the html documentation.

Signed-off-by: Steffen Prohaska <prohaska@zib.de>
This commit is contained in:
Steffen Prohaska
2007-11-17 16:43:13 +01:00
parent 0699304102
commit e9d8b9207e

11
help.c
View File

@@ -245,15 +245,16 @@ static void show_man_page(const char *git_cmd)
{
#ifdef __MINGW32__
{
const char* exec_path = git_exec_path();
char *htmlpath = make_native_separator(
mkpath("%s/doc/git/html/%s.html"
, git_install_prefix()
, git_cmd)
mkpath("%s/../doc/git/html/%s.html"
, exec_path
, git_cmd)
);
if (!file_exists(htmlpath)) {
htmlpath = make_native_separator(
mkpath("%s/doc/git/html/git-%s.html"
, git_install_prefix()
mkpath("%s/../doc/git/html/git-%s.html"
, exec_path
, git_cmd)
);
if (!file_exists(htmlpath)) {