X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft7201-co.sh;h=ebfd34df36068f8808406a98d371731fb85012c4;hb=55524fcf9d6676ca3840227092bf3a14ba404615;hp=bdb808af1aefae97c297f7845a8cd3b595404e89;hpb=c3067cbfb3fbab32177d5f61ea73127f08ab43cb;p=git.git 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