diff options
author | Matthias Kestenholz <mk@spinlock.ch> | 2008-02-18 08:26:03 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-02-18 00:00:38 -0800 |
commit | 6b2f2d9805dd22c6f74957e0d76a1d2921b40c16 (patch) | |
tree | 04abc994611f31c778738577db1e83bd9a979835 /diff.c | |
parent | cf5c51efc9fe3b0ef93c7b78005c57b71acaf959 (diff) | |
download | git-6b2f2d9805dd22c6f74957e0d76a1d2921b40c16.tar.gz |
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.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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); |