3 test_description='apply to deeper directory without getting fooled with symlink'
13 test_expect_success SYMLINKS setup '
15 mkdir -p arch/i386/boot arch/x86_64 &&
16 lecho 1 2 3 4 5 >arch/i386/boot/Makefile &&
17 ln -s ../i386/boot arch/x86_64/boot &&
20 git commit -m initial &&
23 rm arch/x86_64/boot &&
24 mkdir arch/x86_64/boot &&
25 lecho 2 3 4 5 6 >arch/x86_64/boot/Makefile &&
28 git commit -a -m second &&
30 git format-patch --binary -1 --stdout >test.patch
34 test_expect_success SYMLINKS apply '
37 git diff --exit-code test &&
38 git diff --exit-code --cached test &&
39 git apply --index test.patch
43 test_expect_success SYMLINKS 'check result' '
45 git diff --exit-code master &&
46 git diff --exit-code --cached master &&
48 git commit -m replay &&
49 T1=$(git rev-parse "master^{tree}") &&
50 T2=$(git rev-parse "HEAD^{tree}") &&