rerere: remove duplicated functions
[gitweb.git] / t / t2011-checkout-invalid-head.sh
index 764bb0a6bc3de1f3313fb16c384bbd37c82ae5da..15ebdc26ebaaf7881b1f51eb788c2eb2922b6d4f 100755 (executable)
@@ -10,6 +10,10 @@ test_expect_success 'setup' '
        git commit -m initial
 '
 
+test_expect_success 'checkout should not start branch from a tree' '
+       test_must_fail git checkout -b newbranch master^{tree}
+'
+
 test_expect_success 'checkout master from invalid HEAD' '
        echo 0000000000000000000000000000000000000000 >.git/HEAD &&
        git checkout master --