3 # Copyright (c) 2010 Peter Collingbourne
6 test_description='git apply submodule tests'
10 test_expect_success setup '
12 cat > create-sm.patch <<EOF &&
13 diff --git a/dir/sm b/dir/sm
15 index 0000000..0123456
19 +Subproject commit $(test_oid numeric)
21 cat > remove-sm.patch <<EOF
22 diff --git a/dir/sm b/dir/sm
23 deleted file mode 160000
24 index 0123456..0000000
28 -Subproject commit $(test_oid numeric)
32 test_expect_success 'removing a submodule also removes all leading subdirectories' '
33 git apply --index create-sm.patch &&
35 git apply --index remove-sm.patch &&