log: decorate HEAD with branch name
commit51ff0f27bc6bfe83da7304ef9db77f3a2a4a47b0
authorJunio C Hamano <gitster@pobox.com>
Tue, 10 Mar 2015 13:53:21 +0000 (10 14:53 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 10 Mar 2015 22:17:48 +0000 (10 15:17 -0700)
tree704f940bc954f30ffa1491803fef24278b2b94ab
parent4ab682e213d292fb921d21d25208a74ce47e2c19
log: decorate HEAD with branch name

Currently, log decorations do not indicate which branch is checked out
and whether HEAD is detached.

When branch foo is checked out, change the "HEAD, foo" part of the
decorations to "HEAD -> foo". This serves to indicate both ref
decorations (helped by the spacing) as well as their relationshsip.
As a consequence, "HEAD" without any " -> " denotes a detached HEAD now.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
log-tree.c
t/t4013/diff.log_--decorate_--all
t/t4207-log-decoration-colors.sh