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 /builtin-diff.c | |
parent | Sync with 1.5.4.2 and start 1.5.5 Release Notes (diff) | |
download | tgif-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.c | 5 |
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; |