about summary refs log tree commit homepage
path: root/pager.c
diff options
context:
space:
mode:
Diffstat (limited to 'pager.c')
-rw-r--r--pager.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/pager.c b/pager.c
index 2f2cadc82b..cc2df7c72b 100644
--- a/pager.c
+++ b/pager.c
@@ -68,7 +68,10 @@ const char *git_pager(int stdout_is_tty)
 
 static void setup_pager_env(struct argv_array *env)
 {
-        const char *pager_env = stringify(PAGER_ENV);
+        const char *pager_env;
+
+        if (git_config_get_value("core.pagerenv", &pager_env))
+                pager_env = stringify(PAGER_ENV);
 
         while (*pager_env) {
                 struct strbuf buf = STRBUF_INIT;