git-status -v: color diff output when color.ui is set
authorMarkus Heidelberg <markus.heidelberg@web.de>
Thu, 8 Jan 2009 18:53:05 +0000 (19:53 +0100)
committerJunio C Hamano <gitster@pobox.com>
Fri, 9 Jan 2009 01:32:19 +0000 (17:32 -0800)
When using "git status -v", the diff output wasn't colored, even though
color.ui was set. Only when setting color.diff it worked.

Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-commit.c

index 2d90f7430de7c59bd8dbc5c91be19b899a5eac3a..7cf227a1b152df7a4a06b4fe546d7f7cb1a47ae0 100644 (file)
@@ -866,6 +866,9 @@ int cmd_status(int argc, const char **argv, const char *prefix)
        if (wt_status_use_color == -1)
                wt_status_use_color = git_use_color_default;
 
+       if (diff_use_color_default == -1)
+               diff_use_color_default = git_use_color_default;
+
        argc = parse_and_validate_options(argc, argv, builtin_status_usage, prefix);
 
        index_file = prepare_index(argc, argv, prefix);