mirror of
https://github.com/git/git
synced 2024-11-05 18:59:29 +00:00
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
1 changed files with 8 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue