summaryrefslogtreecommitdiff
path: root/pager.c
diff options
context:
space:
mode:
Diffstat (limited to 'pager.c')
-rw-r--r--pager.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/pager.c b/pager.c
index 280f57f796..dcb398da8e 100644
--- a/pager.c
+++ b/pager.c
@@ -15,11 +15,13 @@ 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"))
return;