Re: [PATCH] branch: colorize branches checked out in a linked working tree the same way as the current branch is colorized
From: Nickolai Belakovski <hidden>
Date: 2018-09-27 20:16:48
Not to hijack my own thread, but FWIW git branch -r shows remote branches in red, but old/new status of a remote branch is ambiguous (could have new stuff, could be out of date). Also, git branch -vv shows remote tracking branches in blue. One could argue it should be red since git branch -r is in red. But yea, probably best to take this topic to its own thread. On Thu, Sep 27, 2018 at 1:02 PM Ævar Arnfjörð Bjarmason [off-list ref] wrote:
On Thu, Sep 27 2018, Rafael Ascensão wrote:quoted
On Thu, Sep 27, 2018 at 02:17:08PM -0400, Jeff King wrote:quoted
Do we want to limit this to git-branch, though? Ideally any output you get from git-branch could be replicated with for-each-ref (or with a custom "branch --format"). I.e., could we have a format in ref-filter that matches HEAD, but returns a distinct symbol for a worktree HEAD? That would allow a few things:I was going to suggest using dim green and green for elsewhere and here respectively, in a similar way how range-diff uses it to show different versions of the same diff.It would be really useful to (just via E-Mail to start) itemize the colors we use in various places and what they mean. E.g. I thought green here made sense because in "diff" we show the old/new as red/green, so the branch you're on is "new" in the same sense, i.e. it's what your current state is. But maybe there's cases where that doesn't "rhyme" as it were.