Merge branch 'yd/doc-merge-annotated-tag' into maint
[git/jnareb-git.git] / t / t4115-apply-symlink.sh
blob7674dd2ec9d6f14a0f2181ebf415378521f90fa4
1 #!/bin/sh
3 # Copyright (c) 2005 Junio C Hamano
6 test_description='git apply symlinks and partial files
10 . ./test-lib.sh
12 test_expect_success SYMLINKS setup '
14 ln -s path1/path2/path3/path4/path5 link1 &&
15 git add link? &&
16 git commit -m initial &&
18 git branch side &&
20 rm -f link? &&
22 ln -s htap6 link1 &&
23 git update-index link? &&
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' '
33 git checkout side &&
34 git apply patch &&
35 git diff-files -p >patched &&
36 test_cmp patch patched
40 test_expect_success SYMLINKS '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
49 test_done