status: don't say 'HEAD detached at HEAD'
authorMatthieu Moy <redacted>
Sun, 27 Sep 2015 15:13:42 +0000 (17:13 +0200)
committerJunio C Hamano <redacted>
Fri, 2 Oct 2015 18:29:46 +0000 (11:29 -0700)
commit0eb8548f45cc51bff9b70f551f4c472af353a814
tree81f190e382217a4f05aa16d0230c4e886ec50f21
parent9cb07d81b3b268dc5f88f7048f54ce51d363d2d5
status: don't say 'HEAD detached at HEAD'

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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
t/t3203-branch-output.sh
wt-status.c
git clone https://git.99rst.org/PROJECT