Re: [PATCH v2 0/3] Towards a useable git-branch
- From
Ramkumar Ramachandra <artagnon@gmail.com>
- Date
- May 28, 2013, 14:24 UTC
- Message-ID
- <CALkWK0nFDdfGKeRqKKTTMSm4zqHDOt_iGc1aA7LgD9=y2DJO5A@mail.gmail.com>
- In-Reply-To
- <CALkWK0k=2NZsbSnxS50w+bux8q9mZh7GZzpCqhTP=2jqyHnBSg@mail.gmail.com>
Oh, and by the way:
We're pretty close we are to replacing branch -v and branch -vv.
brv = for-each-ref --format='%(HEAD) %C(green)%<(*)%(refname:short)%C(reset) %<(*)%(objectname:short) %(subject)' refs/heads
brvv = for-each-ref --format='%(HEAD) %C(green)%<(*)%(refname:short)%C(reset) %<(*)%(objectname:short) %C(blue)%(upstream:short)%C(reset) %(subject)' refs/heads
There are small differences:
1. In branch -v, the green-color of the branch name is dependent on %(HEAD). Not worth ironing out, in my opinion.
2. In branch -vv, there are dependent square braces that come on when %(refname:short) is set. We might want to introduce an undocumented %(refname:branchvv) for internal use by branch -vv, for backward compatibility.
What do you think?