summaryrefslogtreecommitdiff
path: root/builtin-commit.c
diff options
context:
space:
mode:
authorMichael J Gruber <git@drmicha.warpmail.net>2009-12-05 16:04:38 +0100
committerJunio C Hamano <gitster@pobox.com>2009-12-05 09:27:56 -0800
commit3fe2a894e98566dd91e69982552454cfb381cf24 (patch)
tree5eb7e8537e42f1045d40ab4d980cbac258daf882 /builtin-commit.c
parent84dbe7b867cfaaa929ed1941f930d564514ae714 (diff)
downloadgit-3fe2a894e98566dd91e69982552454cfb381cf24.tar.gz
status -s: obey color.status
Make the short version of status obey the color.status boolean. We color the status letters only, because they carry the state information and are potentially colored differently, such as for a file with staged changes as well as changes in the worktree against the index. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-commit.c')
-rw-r--r--builtin-commit.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/builtin-commit.c b/builtin-commit.c
index 8411236fda..07cc76c04a 100644
--- a/builtin-commit.c
+++ b/builtin-commit.c
@@ -968,6 +968,10 @@ int cmd_status(int argc, const char **argv, const char *prefix)
case STATUS_FORMAT_SHORT:
if (s.relative_paths)
s.prefix = prefix;
+ if (s.use_color == -1)
+ s.use_color = git_use_color_default;
+ if (diff_use_color_default == -1)
+ diff_use_color_default = git_use_color_default;
wt_shortstatus_print(&s, null_termination);
break;
case STATUS_FORMAT_PORCELAIN: