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>
This commit is contained in:

committed by
Junio C Hamano

parent
74b6763816
commit
9cb07d81b3
@ -106,6 +106,19 @@ EOF
|
|||||||
test_i18ncmp expect actual
|
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' '
|
test_expect_success 'git branch shows detached HEAD properly after moving' '
|
||||||
cat >expect <<EOF &&
|
cat >expect <<EOF &&
|
||||||
* (HEAD detached from $(git rev-parse --short HEAD))
|
* (HEAD detached from $(git rev-parse --short HEAD))
|
||||||
|
Reference in New Issue
Block a user