3 test_description
='apply to deeper directory without getting fooled with symlink'
6 if ! test_have_prereq SYMLINKS
8 say
'Symbolic links not supported, skipping tests.'
19 test_expect_success setup
'
21 mkdir -p arch/i386/boot arch/x86_64 &&
22 lecho 1 2 3 4 5 >arch/i386/boot/Makefile &&
23 ln -s ../i386/boot arch/x86_64/boot &&
26 git commit -m initial &&
29 rm arch/x86_64/boot &&
30 mkdir arch/x86_64/boot &&
31 lecho 2 3 4 5 6 >arch/x86_64/boot/Makefile &&
34 git commit -a -m second &&
36 git format-patch --binary -1 --stdout >test.patch
40 test_expect_success apply
'
43 git diff --exit-code test &&
44 git diff --exit-code --cached test &&
45 git apply --index test.patch
49 test_expect_success
'check result' '
51 git diff --exit-code master &&
52 git diff --exit-code --cached master &&
54 git commit -m replay &&
55 T1=$(git rev-parse "master^{tree}") &&
56 T2=$(git rev-parse "HEAD^{tree}") &&