Skip to content

Commit

Permalink
t3203: test 'detached at' after checkout --detach
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Matthieu Moy authored and Junio C Hamano committed Oct 2, 2015
1 parent 74b6763 commit 9cb07d8
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions t/t3203-branch-output.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 9cb07d8

Please sign in to comment.