diff options
author | Matthieu Moy <Matthieu.Moy@imag.fr> | 2015-09-27 17:13:42 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-10-02 11:29:46 -0700 |
commit | 0eb8548f45cc51bff9b70f551f4c472af353a814 (patch) | |
tree | 81f190e382217a4f05aa16d0230c4e886ec50f21 /t/t3203-branch-output.sh | |
parent | 9cb07d81b3b268dc5f88f7048f54ce51d363d2d5 (diff) | |
download | git-0eb8548f45cc51bff9b70f551f4c472af353a814.tar.gz |
status: don't say 'HEAD detached at HEAD'mm/detach-at-HEAD-reflog
After using "git checkout --detach", the reflog is left with an entry
like
checkout: moving from ... to HEAD
This message is parsed to generate the 'HEAD detached at' message in
'git branch' and 'git status', which leads to the not-so-useful message
'HEAD detached at HEAD'.
Instead, when parsing such reflog entry, resolve HEAD to the
corresponding commit in the reflog, so that the message becomes 'HEAD
detached at $sha1'.
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3203-branch-output.sh')
-rwxr-xr-x | t/t3203-branch-output.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t3203-branch-output.sh b/t/t3203-branch-output.sh index bf24dbf831..16efe7af03 100755 --- a/t/t3203-branch-output.sh +++ b/t/t3203-branch-output.sh @@ -106,7 +106,7 @@ EOF test_i18ncmp expect actual ' -test_expect_failure 'git branch shows detached HEAD properly after checkout --detach' ' +test_expect_success 'git branch shows detached HEAD properly after checkout --detach' ' git checkout master && cat >expect <<EOF && * (HEAD detached at $(git rev-parse --short HEAD^0)) |