help -i: properly error out if no info viewer can be found
authorGerrit Pape <pape@smarden.org>
Tue, 27 Oct 2009 13:31:33 +0000 (13:31 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 28 Oct 2009 06:05:24 +0000 (23:05 -0700)
With this commit, git help -i <cmd> prints an error message and exits
non-zero instead of being silent and exit code 0.

Reported by Trent W. Buck through
http://bugs.debian.org/537664

Signed-off-by: Gerrit Pape <pape@smarden.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-help.c
index e1eba778a526f500b0a65a6b112e468f04a3f869..e1ade8edd3c4f05771b286e9f9a6657ff05c7eb0 100644 (file)
@@ -372,6 +372,7 @@ static void show_info_page(const char *git_cmd)
        const char *page = cmd_to_page(git_cmd);
        setenv("INFOPATH", system_path(GIT_INFO_PATH), 1);
        execlp("info", "info", "gitman", page, NULL);
+       die("no info viewer handled the request");
 }
 
 static void get_html_page_path(struct strbuf *page_path, const char *page)