Skip to content

Commit 3f4b609

Browse files
marcowsgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 152d70f commit 3f4b609

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

builtin-commit.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -945,6 +945,9 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
945945

946946
git_config(git_commit_config, NULL);
947947

948+
if (wt_status_use_color == -1)
949+
wt_status_use_color = git_use_color_default;
950+
948951
argc = parse_and_validate_options(argc, argv, builtin_commit_usage, prefix);
949952

950953
index_file = prepare_index(argc, argv, prefix);

0 commit comments

Comments
 (0)