aboutsummaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorMatthias Lederhofer <matled@gmx.net>2006-07-30 00:27:43 +0200
committerJunio C Hamano <junkio@cox.net>2006-07-31 15:32:24 -0700
commitaa086eb813d4fe21aac556a94efe5e29b44d8ca4 (patch)
tree04d9a749f051bdf8d3f7239ea29e9917addc7c2d /diff.c
parent9590b041ea464c46d5a6811df5bce83c5dd4d457 (diff)
downloadgit-aa086eb813d4fe21aac556a94efe5e29b44d8ca4.tar.gz
git-aa086eb813d4fe21aac556a94efe5e29b44d8ca4.tar.xz
pager: config variable pager.color
enable/disable colored output when the pager is in use Signed-off-by: Matthias Lederhofer <matled@gmx.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/diff.c b/diff.c
index 6a7137648..607c357f5 100644
--- a/diff.c
+++ b/diff.c
@@ -175,7 +175,7 @@ int git_diff_ui_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) || pager_in_use) {
+ if (isatty(1) || (pager_in_use && pager_use_color)) {
char *term = getenv("TERM");
if (term && strcmp(term, "dumb"))
diff_use_color_default = 1;