3 test_description='git reset should work on unborn branch'
6 test_expect_success 'setup' '
11 test_expect_success 'reset' '
16 git ls-files >actual &&
17 test_cmp expect actual
20 test_expect_success 'reset HEAD' '
23 test_must_fail git reset HEAD
26 test_expect_success 'reset $file' '
32 git ls-files >actual &&
33 test_cmp expect actual
36 test_expect_success PERL 'reset -p' '
43 git ls-files >actual &&
44 test_cmp expect actual
47 test_expect_success 'reset --soft is a no-op' '
53 git ls-files >actual &&
54 test_cmp expect actual
57 test_expect_success 'reset --hard' '
60 test_when_finished "echo a >a" &&
64 git ls-files >actual &&
65 test_cmp expect actual &&
66 test_path_is_missing a