aboutsummaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorMatthias Kestenholz <mk@spinlock.ch>2008-02-18 08:26:03 +0100
committerJunio C Hamano <gitster@pobox.com>2008-02-18 00:00:38 -0800
commit6b2f2d9805dd22c6f74957e0d76a1d2921b40c16 (patch)
tree04abc994611f31c778738577db1e83bd9a979835 /diff.c
parentcf5c51efc9fe3b0ef93c7b78005c57b71acaf959 (diff)
downloadgit-6b2f2d9805dd22c6f74957e0d76a1d2921b40c16.tar.gz
git-6b2f2d9805dd22c6f74957e0d76a1d2921b40c16.tar.xz
Add color.ui variable which globally enables colorization if set
Signed-off-by: Matthias Kestenholz <mk@spinlock.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/diff.c b/diff.c
index 58fe7750f..c30c25227 100644
--- a/diff.c
+++ b/diff.c
@@ -20,7 +20,7 @@
static int diff_detect_rename_default;
static int diff_rename_limit_default = 100;
-static int diff_use_color_default;
+int diff_use_color_default = -1;
static const char *external_diff_cmd_cfg;
int diff_auto_refresh_index = 1;
@@ -191,7 +191,7 @@ int git_diff_basic_config(const char *var, const char *value)
}
}
- return git_default_config(var, value);
+ return git_color_default_config(var, value);
}
static char *quote_two(const char *one, const char *two)
@@ -2055,7 +2055,7 @@ void diff_setup(struct diff_options *options)
options->change = diff_change;
options->add_remove = diff_addremove;
- if (diff_use_color_default)
+ if (diff_use_color_default > 0)
DIFF_OPT_SET(options, COLOR_DIFF);
else
DIFF_OPT_CLR(options, COLOR_DIFF);