"git -p cmd" to page anywhere
[gitweb.git] / diff.c
diff --git a/diff.c b/diff.c
index 3e26180f08204df2e7519e4613aa6e3e844e21b2..a00f9d1e5244c8a7d2edfcef55cb92d3d3df252a 100644 (file)
--- a/diff.c
+++ b/diff.c
@@ -112,7 +112,7 @@ int git_diff_config(const char *var, const char *value)
                        diff_use_color_default = 1; /* bool */
                else if (!strcasecmp(value, "auto")) {
                        diff_use_color_default = 0;
-                       if (isatty(1)) {
+                       if (isatty(1) || pager_in_use) {
                                char *term = getenv("TERM");
                                if (term && strcmp(term, "dumb"))
                                        diff_use_color_default = 1;