summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xt/t7201-co.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/t/t7201-co.sh b/t/t7201-co.sh
index bdb808af1a..ebfd34df36 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