summaryrefslogtreecommitdiff
path: root/t/t4207-log-decoration-colors.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-03-10 13:53:21 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-03-10 22:17:48 (GMT)
commit51ff0f27bc6bfe83da7304ef9db77f3a2a4a47b0 (patch)
tree704f940bc954f30ffa1491803fef24278b2b94ab /t/t4207-log-decoration-colors.sh
parent4ab682e213d292fb921d21d25208a74ce47e2c19 (diff)
downloadgit-51ff0f27bc6bfe83da7304ef9db77f3a2a4a47b0.zip
git-51ff0f27bc6bfe83da7304ef9db77f3a2a4a47b0.tar.gz
git-51ff0f27bc6bfe83da7304ef9db77f3a2a4a47b0.tar.bz2
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>
Diffstat (limited to 't/t4207-log-decoration-colors.sh')
-rwxr-xr-xt/t4207-log-decoration-colors.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/t/t4207-log-decoration-colors.sh b/t/t4207-log-decoration-colors.sh
index 6b8ad4f..f8008b6 100755
--- a/t/t4207-log-decoration-colors.sh
+++ b/t/t4207-log-decoration-colors.sh
@@ -44,10 +44,10 @@ test_expect_success setup '
'
cat >expected <<EOF
-${c_commit}COMMIT_ID${c_reset}${c_commit} (${c_reset}${c_HEAD}HEAD${c_reset}${c_commit},\
+${c_commit}COMMIT_ID${c_reset}${c_commit} (${c_reset}${c_HEAD}HEAD${c_reset}${c_commit} ->\
+ ${c_reset}${c_branch}master${c_reset}${c_commit},\
${c_reset}${c_tag}tag: v1.0${c_reset}${c_commit},\
- ${c_reset}${c_tag}tag: B${c_reset}${c_commit},\
- ${c_reset}${c_branch}master${c_reset}${c_commit})${c_reset} B
+ ${c_reset}${c_tag}tag: B${c_reset}${c_commit})${c_reset} B
${c_commit}COMMIT_ID${c_reset}${c_commit} (${c_reset}${c_tag}tag: A1${c_reset}${c_commit},\
${c_reset}${c_remoteBranch}other/master${c_reset}${c_commit})${c_reset} A1
${c_commit}COMMIT_ID${c_reset}${c_commit} (${c_reset}${c_stash}refs/stash${c_reset}${c_commit})${c_reset}\