mirror of
https://github.com/git/git.git
synced 2026-03-13 18:33:25 +01:00
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:
11
help.c
11
help.c
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user