summaryrefslogtreecommitdiff
path: root/builtin-diff.c
diff options
context:
space:
mode:
authorLibravatar Matthias Kestenholz <mk@spinlock.ch>2008-02-18 08:26:03 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2008-02-18 00:00:38 -0800
commit6b2f2d9805dd22c6f74957e0d76a1d2921b40c16 (patch)
tree04abc994611f31c778738577db1e83bd9a979835 /builtin-diff.c
parentSync with 1.5.4.2 and start 1.5.5 Release Notes (diff)
downloadtgif-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 'builtin-diff.c')
-rw-r--r--builtin-diff.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/builtin-diff.c b/builtin-diff.c
index 8d7a5697f2..8f53f52dcb 100644
--- a/builtin-diff.c
+++ b/builtin-diff.c
@@ -4,6 +4,7 @@
* Copyright (c) 2006 Junio C Hamano
*/
#include "cache.h"
+#include "color.h"
#include "commit.h"
#include "blob.h"
#include "tag.h"
@@ -229,6 +230,10 @@ int cmd_diff(int argc, const char **argv, const char *prefix)
prefix = setup_git_directory_gently(&nongit);
git_config(git_diff_ui_config);
+
+ if (diff_use_color_default == -1)
+ diff_use_color_default = git_use_color_default;
+
init_revisions(&rev, prefix);
rev.diffopt.skip_stat_unmatch = !!diff_auto_refresh_index;