Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorMatthias Lederhofer <matled@gmx.net>2006-07-30 02:27:43 +0400
committerJunio C Hamano <junkio@cox.net>2006-08-01 02:32:24 +0400
commitaa086eb813d4fe21aac556a94efe5e29b44d8ca4 (patch)
tree04d9a749f051bdf8d3f7239ea29e9917addc7c2d /diff.c
parent9590b041ea464c46d5a6811df5bce83c5dd4d457 (diff)
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 6a71376483..607c357f5a 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;