3 test_description='checkout switching away from an invalid branch'
7 test_expect_success 'setup' '
13 test_expect_success 'checkout should not start branch from a tree' '
14 test_must_fail git checkout -b newbranch master^{tree}
17 test_expect_success 'checkout master from invalid HEAD' '
18 echo 0000000000000000000000000000000000000000 >.git/HEAD &&
19 git checkout master --