send-email: fix nasty bug in ask() function
[git/mjg.git] / t / t4115-apply-symlink.sh
blob1a3aea34cec6552f40271bbed60e42d199ef25be
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
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 test_cmp 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 test_cmp patch patched
56 test_done