test: checkout shouldn't say that HEAD has moved if it didn't

Signed-off-by: しらいしななこ <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Nanako Shiraishi 2009-05-17 11:43:08 +09:00 committed by Junio C Hamano
parent dd42c2f015
commit e4b09dad9f

View file

@ -534,4 +534,12 @@ test_expect_success 'failing checkout -b should not break working tree' '
'
test_expect_success 'switch out of non-branch' '
git reset --hard master &&
git checkout master^0 &&
echo modified >one &&
test_must_fail git checkout renamer 2>error.log &&
! grep "^Previous HEAD" error.log
'
test_done