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:
parent
dd42c2f015
commit
e4b09dad9f
@ -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
|
test_done
|
||||||
|
Loading…
Reference in New Issue
Block a user