git add a b &&
git reset &&
- >expect &&
git ls-files >actual &&
- test_cmp expect actual
+ test_must_be_empty actual
'
test_expect_success 'reset HEAD' '
rm .git/index &&
git add a &&
echo y >yes &&
- git reset -p <yes &&
+ git reset -p <yes >output &&
- >expect &&
git ls-files >actual &&
- test_cmp expect actual
+ test_must_be_empty actual &&
+ test_i18ngrep "Unstage" output
'
test_expect_success 'reset --soft is a no-op' '
test_when_finished "echo a >a" &&
git reset --hard &&
- >expect &&
git ls-files >actual &&
- test_cmp expect actual &&
+ test_must_be_empty actual &&
test_path_is_missing a
'