threads / patch / 21378

patchhelp -i: properly error out if no info viewer can be found

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

## tl;dr

2 messages between Oct 27, 2009 and Oct 28, 2009. Diffs are folded; open one to read it.

replies: 1people: 2as markdown or json

Gerrit Pape· Oct 27, 2009, 13:31 UTC · lore

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>
---
 builtin-help.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
Show changes to builtin-help.c +1 −0
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

← back to recent threads