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' '
40 git reset -p <yes >output &&
43 git ls-files >actual &&
44 test_cmp expect actual &&
45 test_i18ngrep "Unstage" output
48 test_expect_success 'reset --soft is a no-op' '
54 git ls-files >actual &&
55 test_cmp expect actual
58 test_expect_success 'reset --hard' '
61 test_when_finished "echo a >a" &&
65 git ls-files >actual &&
66 test_cmp expect actual &&
67 test_path_is_missing a