diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-02-20 16:13:56 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-02-20 16:13:56 -0800 |
commit | b23b27eb5dc950081d4f76ae84f10168c4d149bd (patch) | |
tree | 6e29309bd8f2ae4b200214a0d2257aa1bc909515 /builtin-diff.c | |
parent | 6fe870f032e4a247cdcf2949bb24d103873ff597 (diff) | |
parent | 6b2f2d9805dd22c6f74957e0d76a1d2921b40c16 (diff) | |
download | git-b23b27eb5dc950081d4f76ae84f10168c4d149bd.tar.gz git-b23b27eb5dc950081d4f76ae84f10168c4d149bd.tar.xz |
Merge branch 'mk/color'
* mk/color:
Add color.ui variable which globally enables colorization if set
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 8d7a5697f..8f53f52dc 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; |