3 test_description
='git reset should work on unborn branch'
6 test_expect_success
'setup' '
11 test_expect_success
'reset' '
14 test "$(git ls-files)" = ""
17 test_expect_success
'reset HEAD' '
20 test_must_fail git reset HEAD
23 test_expect_success
'reset $file' '
27 test "$(git ls-files)" = "b"
30 test_expect_success
'reset -p' '
33 echo y | git reset -p &&
34 test "$(git ls-files)" = ""
37 test_expect_success
'reset --soft is a no-op' '
41 test "$(git ls-files)" = "a"
44 test_expect_success
'reset --hard' '
48 test "$(git ls-files)" = "" &&
49 test_path_is_missing a