log: decorate detached HEAD differentlydecorate-detached-head
commit94d38896d593fd3f088870130a1b04e7e6edc63d
authorMichael J Gruber <git@drmicha.warpmail.net>
Wed, 18 Feb 2015 13:05:37 +0000 (18 14:05 +0100)
committerMichael J Gruber <git@drmicha.warpmail.net>
Wed, 11 Mar 2015 10:29:55 +0000 (11 11:29 +0100)
tree2e89b388bd83d77cb1faa08188245ac758525e83
parent1f807f94f1528a9b78383ecd4a5f640fbc72426b
log: decorate detached HEAD differently

"git status" and "git branch" let the user know when the HEAD is
detached, as well as the current branch, while "git log --decorate" does not.

Change the decoration by a non-detached HEAD pointing to branch foo to
"HEAD->foo". This can be seen as giving more information about the
decoration item itself in the same way as we prefix tags by "tag: ".
log-tree.c
t/t4013/diff.log_--decorate=full_--all
t/t4013/diff.log_--decorate_--all
t/t4207-log-decoration-colors.sh