threads / discuss / 45703

Feature request: Configurable branch colors in git status --short --branch

Subject: Feature request: Configurable branch colors in git status --short --branch

## tl;dr

2 messages between Apr 15, 2017 and Apr 16, 2017.

replies: 1people: 2as markdown or json

Stephen Kent· Apr 15, 2017, 20:00 UTC · lore

It would be nice if the branch, remote tracking branch, and branch commit comparison count colors in git status --short --branch were configurable like the other git status colors.

Example command output:
$ git status --short --branch
## master...origin/master [ahead 1]
M  README.md
M  wrapper.c
 M ws.c
 M wt-status.c

In the above example, "master", "origin/master", and "1" (in "ahead 1") use git's standard red and green colors. I have configured the staged and unstaged modification markers (the M's) to use brighter green and red, and I would like to configure the branch info to also use those brighter colors. However, there is currently no option (color slot for git status in git config) to change the branch colors in git status --short --branch.

(See the attached screenshot or http://i.imgur.com/evqgaRd.png to see the colors I am talking about.)

Stephen
Jeff King· Apr 16, 2017, 06:44 UTC · re: Stephen Kent · lore

Re: Feature request: Configurable branch colors in git status --short --branch

On Sat, Apr 15, 2017 at 01:00:51PM -0700, Stephen Kent wrote:
> It would be nice if the branch, remote tracking branch, and branch commit
> comparison count colors in git status --short --branch were configurable
> like the other git status colors.
That seems like a reasonable thing to want.

I think the infrastructure is all there, and it would just need an update to builtin/commit.c:parse_status_slot() to map the color.status.* names into the {LOCAL,REMOTE}_BRANCH enum values.

Want to try your hand at a patch?
-Peff

← back to recent threads