notes.c: remove inappropriate call to return
[git/jnareb-git/bp-gitweb.git] / t / t4115-apply-symlink.sh
blobb852e5898009bca0205c231033f8f72f48962b81
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_have_prereq SYMLINKS
13 then
14 say 'Symbolic links not supported, skipping tests.'
15 test_done
18 test_expect_success setup '
20 ln -s path1/path2/path3/path4/path5 link1 &&
21 git add link? &&
22 git commit -m initial &&
24 git branch side &&
26 rm -f link? &&
28 ln -s htap6 link1 &&
29 git update-index link? &&
30 git commit -m second &&
32 git diff-tree -p HEAD^ HEAD >patch &&
33 git apply --stat --summary patch
37 test_expect_success 'apply symlink patch' '
39 git checkout side &&
40 git apply patch &&
41 git diff-files -p >patched &&
42 test_cmp patch patched
46 test_expect_success 'apply --index symlink patch' '
48 git checkout -f side &&
49 git apply --index patch &&
50 git diff-index --cached -p HEAD >patched &&
51 test_cmp patch patched
55 test_done