Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/builtin/help.c b/builtin/help.c
- index 334a849..c2a3670 100644
- --- a/builtin/help.c
- +++ b/builtin/help.c
- @@ -32,6 +32,8 @@ enum help_format {
- HELP_FORMAT_WEB
- };
- +static const char *manpage_canary = "/usr/share/doc/git-man/copyright";
- +
- static const char *html_path;
- static int show_all = 0;
- @@ -342,8 +344,15 @@ static void show_man_page(const char *git_cmd)
- struct man_viewer_list *viewer;
- const char *page = cmd_to_page(git_cmd);
- const char *fallback = getenv("GIT_MAN_VIEWER");
- + struct stat throwaway;
- + int find_canary = 0;
- setup_man_path();
- + find_canary = stat(manpage_canary, &throwaway);
- + if (find_canary == -1) {
- + printf(_("git: no man pages installed, please ask your system administrator to install the git-man package.\n"));
- + exit(0);
- + }
- for (viewer = man_viewer_list; viewer; viewer = viewer->next)
- {
- exec_viewer(viewer->name, page); /* will return when unable */
Add Comment
Please, Sign In to add comment