Merge commit 'junio/next' into next
[git/platforms/storm.git] / t / t4115-apply-symlink.sh
blob6b21293867eb37ab4d902e91b35b1e3672ff0f6a
1 #!/bin/sh
3 # Copyright (c) 2005 Junio C Hamano
6 test_description='git apply symlinks and partial files
10 . ./test-lib.sh
12 if test "$no_symlinks"
13 then
14 say 'Symbolic links not supported, skipping tests.'
15 test_done
16 exit
19 test_expect_success setup '
21 ln -s path1/path2/path3/path4/path5 link1 &&
22 git add link? &&
23 git commit -m initial &&
25 git branch side &&
27 rm -f link? &&
29 ln -s htap6 link1 &&
30 git update-index link? &&
31 git commit -m second &&
33 git diff-tree -p HEAD^ HEAD >patch &&
34 git apply --stat --summary patch
38 test_expect_success 'apply symlink patch' '
40 git checkout side &&
41 git apply patch &&
42 git diff-files -p >patched &&
43 git diff patch patched
47 test_expect_success 'apply --index symlink patch' '
49 git checkout -f side &&
50 git apply --index patch &&
51 git diff-index --cached -p HEAD >patched &&
52 git diff patch patched
56 test_done