[PATCH] help -i: properly error out if no info viewer can be found

Subsystems: the rest

DORMANTno replies

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

[PATCH] help -i: properly error out if no info viewer can be found

From: Gerrit Pape <hidden>
Date: 2016-06-15 22:47:37

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 <redacted>
---
 builtin-help.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/builtin-help.c b/builtin-help.c
index e1eba77..e1ade8e 100644
--- a/builtin-help.c
+++ b/builtin-help.c
@@ -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)
-- 
1.6.5.2

Re: [PATCH] help -i: properly error out if no info viewer can be found

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:47:37

Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help