diff options
author | Matthieu Moy <Matthieu.Moy@imag.fr> | 2015-09-27 17:13:41 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-10-02 11:29:16 -0700 |
commit | 9cb07d81b3b268dc5f88f7048f54ce51d363d2d5 (patch) | |
tree | 615693e971877ad995497f50a799b1d454144833 /t/t3203-branch-output.sh | |
parent | 74b67638166ca2e66497ede559dbf393e7af8b40 (diff) | |
download | git-9cb07d81b3b268dc5f88f7048f54ce51d363d2d5.tar.gz git-9cb07d81b3b268dc5f88f7048f54ce51d363d2d5.tar.xz |
t3203: test 'detached at' after checkout --detach
This currently fails: the output is 'HEAD detached at HEAD'.
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 | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/t/t3203-branch-output.sh b/t/t3203-branch-output.sh index f51d0f3ca..bf24dbf83 100755 --- a/t/t3203-branch-output.sh +++ b/t/t3203-branch-output.sh @@ -106,6 +106,19 @@ EOF test_i18ncmp expect actual ' +test_expect_failure 'git branch shows detached HEAD properly after checkout --detach' ' + git checkout master && + cat >expect <<EOF && +* (HEAD detached at $(git rev-parse --short HEAD^0)) + branch-one + branch-two + master +EOF + git checkout --detach && + git branch >actual && + test_i18ncmp expect actual +' + test_expect_success 'git branch shows detached HEAD properly after moving' ' cat >expect <<EOF && * (HEAD detached from $(git rev-parse --short HEAD)) |