4 * This is split up from the rest of git so that we might do
5 * something different on Windows, for example.
8 static void run_pager(const char *pager
)
10 execlp(pager
, pager
, NULL
);
11 execl("/bin/sh", "sh", "-c", pager
, NULL
);
14 void setup_pager(void)
18 const char *pager
= getenv("GIT_PAGER");
23 pager
= getenv("PAGER");
26 else if (!*pager
|| !strcmp(pager
, "cat"))
29 pager_in_use
= 1; /* means we are emitting to terminal */
40 /* return in the child */
48 /* The original process turns into the PAGER */
53 setenv("LESS", "FRSX", 0);
55 die("unable to execute pager '%s'", pager
);