So, while investigating alignment operators in pretty-formats, I found
out that it's way too much effort and totally not worth it (atleast
not immediately; we can add it later if we want). What I want now is
a useable git-branch output. And I think I can say that I've achieved
I currently have hot aliased to
%C(green)%(refname:short)%C(reset)%(upstream:trackshort)' --count 10
and it works beautifully for me. Sample output:
% git hot
The asterisk is red, the branch names are in green, and the tracking
marker is white.
I'm very happy with the implementation too:
1. color only kicks in at the parsing layer.
2. HEAD is a new atom.
3. :track[short] is a formatp like :short.
There is no need to use a hammer and coerce everything into an atom,
or throw everything out the window and start from scratch to conform
to pretty-formats perfectly. Let's extend the existing format to be
Ramkumar Ramachandra (3):
for-each-ref: introduce %C(...) for color
for-each-ref: introduce %(HEAD) marker
for-each-ref: introduce %(upstream:track[short])
builtin/for-each-ref.c | 81 +++++++++++++++++++++++++++++++++++++++++++++-----
1 file changed, 73 insertions(+), 8 deletions(-)
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html