help (mingw): Cleaned up whitespace indentation

The separate block for the ShellExecute code is no longer
needed and therefore cleand up.

Also included is minor rewording of the error message if
the HTML page is not found.

Signed-off-by: Steffen Prohaska <prohaska@zib.de>
This commit is contained in:
Steffen Prohaska
2007-12-16 22:46:49 +01:00
parent a142ff84ed
commit 301de2ab75

36
help.c
View File

@@ -336,28 +336,26 @@ static void show_info_page(const char *git_cmd)
static void show_html_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"
, exec_path
, git_cmd)
);
const char* exec_path = git_exec_path();
char *htmlpath = make_native_separator(
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"
, exec_path
, git_cmd)
);
if (!file_exists(htmlpath)) {
htmlpath = make_native_separator(
mkpath("%s/../doc/git/html/git-%s.html"
, exec_path
, git_cmd)
);
if (!file_exists(htmlpath)) {
fprintf(stderr, "Can't find help for '%s'.\n"
, git_cmd);
exit(1);
}
fprintf(stderr, "Can't find HTML help for '%s'.\n"
, git_cmd);
exit(1);
}
printf("Launching default browser to display HTML help ...\n");
ShellExecute(NULL, "open", htmlpath, NULL, "\\", 0);
}
printf("Launching default browser to display HTML help ...\n");
ShellExecute(NULL, "open", htmlpath, NULL, "\\", 0);
#else
const char *page = cmd_to_page(git_cmd);
execl_git_cmd("help--browse", page, NULL);