Skip to content

Commit

Permalink
test: checkout shouldn't say that HEAD has moved if it didn't
Browse files Browse the repository at this point in the history
Signed-off-by: しらいしななこ <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Nanako Shiraishi authored and Junio C Hamano committed May 17, 2009
1 parent dd42c2f commit e4b09da
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions t/t7201-co.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit e4b09da

Please sign in to comment.