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>
This commit is contained in:
committed by
Junio C Hamano
parent
cf5c51efc9
commit
6b2f2d9805
@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user