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' '
34 test_expect_success 'apply --index empty' '
37 git apply --index patch0 &&
38 test_cmp expect empty &&
42 test_expect_success 'apply create' '
46 test_cmp expect missing
49 test_expect_success 'apply --index create' '
52 git apply --index patch1 &&
53 test_cmp expect missing &&