aboutsummaryrefslogtreecommitdiff
path: root/builtin/commit.c
diff options
context:
space:
mode:
authorAleksi Aalto <aga@iki.fi>2010-11-18 01:40:05 +0200
committerJunio C Hamano <gitster@pobox.com>2010-11-29 16:31:34 -0800
commit1d282327d7354dd3a1caefa4af06562aa816710d (patch)
tree8779a64c22934c6be78c08705576272b5276bfdf /builtin/commit.c
parent7d43de925b2771d295d8fc4341b7bd544e2a74fa (diff)
downloadgit-1d282327d7354dd3a1caefa4af06562aa816710d.tar.gz
git-1d282327d7354dd3a1caefa4af06562aa816710d.tar.xz
status: show branchname with a configurable color
You can tell "git status" to paint the name of the current branch in its output (the line that says "On branch ...") by setting the configuration variable color.status.branch; it is by default turned off. Signed-off-by: Aleksi Aalto <aga@iki.fi> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit.c')
-rw-r--r--builtin/commit.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin/commit.c b/builtin/commit.c
index 4fd1a1692..025c342e5 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -984,6 +984,8 @@ static int parse_status_slot(const char *var, int offset)
{
if (!strcasecmp(var+offset, "header"))
return WT_STATUS_HEADER;
+ if (!strcasecmp(var+offset, "branch"))
+ return WT_STATUS_ONBRANCH;
if (!strcasecmp(var+offset, "updated")
|| !strcasecmp(var+offset, "added"))
return WT_STATUS_UPDATED;