X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=pager.c;h=dcb398da8e703de2999badb976dee7322eff470b;hb=8435a9cb2662ca4326e96ea78d58b9376fb21f7e;hp=bb14e99735dd08c31c66325eacdcde4f3f2c685c;hpb=fc93dbbfc91d5214b03101e057ba16f329763ef9;p=git.git diff --git a/pager.c b/pager.c index bb14e9973..dcb398da8 100644 --- a/pager.c +++ b/pager.c @@ -5,8 +5,6 @@ * something different on Windows, for example. */ -int pager_in_use; - static void run_pager(const char *pager) { execlp(pager, pager, NULL); @@ -17,10 +15,12 @@ void setup_pager(void) { pid_t pid; int fd[2]; - const char *pager = getenv("PAGER"); + const char *pager = getenv("GIT_PAGER"); if (!isatty(1)) return; + if (!pager) + pager = getenv("PAGER"); if (!pager) pager = "less"; else if (!*pager || !strcmp(pager, "cat"))