From: Nanako Shiraishi Date: Sun, 17 May 2009 02:43:08 +0000 (+0900) Subject: test: checkout shouldn't say that HEAD has moved if it didn't X-Git-Tag: v1.6.3.2~34 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e4b09dad9f65395fd4bb8ab165012a3a6698a75b;p=git.git test: checkout shouldn't say that HEAD has moved if it didn't Signed-off-by: しらいしななこ Signed-off-by: Junio C Hamano --- diff --git a/t/t7201-co.sh b/t/t7201-co.sh index bdb808af1..ebfd34df3 100755 --- a/t/t7201-co.sh +++ b/t/t7201-co.sh @@ -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