3 test_description
='apply to deeper directory without getting fooled with symlink'
8 say
'Symbolic links not supported, skipping tests.'
20 test_expect_success setup
'
22 mkdir -p arch/i386/boot arch/x86_64 &&
23 lecho 1 2 3 4 5 >arch/i386/boot/Makefile &&
24 ln -s ../i386/boot arch/x86_64/boot &&
27 git commit -m initial &&
30 rm arch/x86_64/boot &&
31 mkdir arch/x86_64/boot &&
32 lecho 2 3 4 5 6 >arch/x86_64/boot/Makefile &&
35 git commit -a -m second &&
37 git format-patch --binary -1 --stdout >test.patch
41 test_expect_success apply
'
44 git diff --exit-code test &&
45 git diff --exit-code --cached test &&
46 git apply --index test.patch
50 test_expect_success
'check result' '
52 git diff --exit-code master &&
53 git diff --exit-code --cached master &&
55 git commit -m replay &&
56 T1=$(git rev-parse "master^{tree}") &&
57 T2=$(git rev-parse "HEAD^{tree}") &&