aboutsummaryrefslogtreecommitdiff
path: root/builtin-commit.c
diff options
context:
space:
mode:
authorMarkus Heidelberg <markus.heidelberg@web.de>2009-01-08 19:53:01 +0100
committerJunio C Hamano <gitster@pobox.com>2009-01-08 17:30:43 -0800
commit3f4b609f5f3146a34eb72e82ab55714328e0bd1a (patch)
tree1548277a0ae9e66bad89db04fd45e9d1a603561a /builtin-commit.c
parent152d70f7287c54135aa93990b462e2d34a39f500 (diff)
downloadgit-3f4b609f5f3146a34eb72e82ab55714328e0bd1a.tar.gz
git-3f4b609f5f3146a34eb72e82ab55714328e0bd1a.tar.xz
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>
Diffstat (limited to 'builtin-commit.c')
-rw-r--r--builtin-commit.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/builtin-commit.c b/builtin-commit.c
index e88b78f81..2d90f7430 100644
--- a/builtin-commit.c
+++ b/builtin-commit.c
@@ -945,6 +945,9 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
git_config(git_commit_config, NULL);
+ if (wt_status_use_color == -1)
+ wt_status_use_color = git_use_color_default;
+
argc = parse_and_validate_options(argc, argv, builtin_commit_usage, prefix);
index_file = prepare_index(argc, argv, prefix);