3 test_description
='apply empty'
7 test_expect_success setup
'
11 git commit -m initial &&
18 sed -e "/^diff --git/d" \
20 -e "s|a/empty|empty.orig|" \
21 -e "s|b/empty|empty|" >patch0 &&
22 sed -e "s|empty|missing|" patch0 >patch1 &&
24 git update-index --refresh
27 test_expect_success
'apply empty' '
35 test_expect_success
'apply --index empty' '
39 git apply --index patch0 &&
40 test_cmp expect empty &&
44 test_expect_success
'apply create' '
49 test_cmp expect missing
52 test_expect_success
'apply --index create' '
56 git apply --index patch1 &&
57 test_cmp expect missing &&