3 # Copyright (c) 2005 Junio C Hamano
6 test_description
='git apply symlinks and partial files
12 test_expect_success setup
'
13 mkdir -p path1/path2/path3/path4/
14 > path1/path2/path3/path4/path5
15 test_ln_s_add path1/path2/path3/path4/path5 link1 &&
16 git commit -m initial &&
23 test_ln_s_add htap6 link1 &&
24 git commit -m second &&
26 git diff-tree -p HEAD^ HEAD >patch &&
27 git apply --stat --summary patch
31 test_expect_success SYMLINKS
'apply symlink patch' '
35 git diff-files -p >patched &&
36 test_cmp patch patched
40 test_expect_success
'apply --index symlink patch' '
42 git checkout -f side &&
43 git apply --index patch &&
44 git diff-index --cached -p HEAD >patched &&
45 test_cmp patch patched