test_expect_success 'apply empty' '
git reset --hard &&
- >empty &&
rm -f missing &&
git apply patch0 &&
test_cmp expect empty
test_expect_success 'apply --index empty' '
git reset --hard &&
- >empty &&
rm -f missing &&
git apply --index patch0 &&
test_cmp expect empty &&
test_expect_success 'apply create' '
git reset --hard &&
- >empty &&
rm -f missing &&
git apply patch1 &&
test_cmp expect missing
test_expect_success 'apply --index create' '
git reset --hard &&
- >empty &&
rm -f missing &&
git apply --index patch1 &&
test_cmp expect missing &&