From 301de2ab75f77c4be6f3d83ff2b4201b6b3bd25c Mon Sep 17 00:00:00 2001 From: Steffen Prohaska Date: Sun, 16 Dec 2007 22:46:49 +0100 Subject: [PATCH] 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 --- help.c | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/help.c b/help.c index dcb6a3f6c5..146d131820 100644 --- a/help.c +++ b/help.c @@ -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);