Skip to content

Commit 0630a66

Browse files
committed
Merge branch 'mh/maint-commit-color-status' into maint
* mh/maint-commit-color-status: git-status -v: color diff output when color.ui is set git-commit: color status output when color.ui is set
2 parents f9686cd + 38920dd commit 0630a66

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

builtin-commit.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -865,6 +865,9 @@ int cmd_status(int argc, const char **argv, const char *prefix)
865865
if (wt_status_use_color == -1)
866866
wt_status_use_color = git_use_color_default;
867867

868+
if (diff_use_color_default == -1)
869+
diff_use_color_default = git_use_color_default;
870+
868871
argc = parse_and_validate_options(argc, argv, builtin_status_usage, prefix);
869872

870873
index_file = prepare_index(argc, argv, prefix);
@@ -944,6 +947,9 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
944947

945948
git_config(git_commit_config, NULL);
946949

950+
if (wt_status_use_color == -1)
951+
wt_status_use_color = git_use_color_default;
952+
947953
argc = parse_and_validate_options(argc, argv, builtin_commit_usage, prefix);
948954

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

0 commit comments

Comments
 (0)