git-commit: color status output when color.ui is set
When using "git commit" and there was nothing to commit (the editor wasn't launched), the status output wasn't colored, even though color.ui was set. Only when setting color.status it worked. Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Markus Heidelberg committed
Jan 8, 2009 at 19:53 UTC
3f4b609f5f3146a34eb72e82ab55714328e0bd1a
1 file changed
+3
builtin-commit.c
+3
@@ -945,6 +945,9 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
945
946
git_config(git_commit_config, NULL);
947
948
+ if (wt_status_use_color == -1)
949
+ wt_status_use_color = git_use_color_default;
950
+
951
argc = parse_and_validate_options(argc, argv, builtin_commit_usage, prefix);
952
953
index_file = prepare_index(argc, argv, prefix);