Merge branch 'rs/t4202-invert-grep-test-fix'
[git/debian.git] / t / t4115-apply-symlink.sh
blobd0f3edef54acf6247a034041eb234c73f67d5762
1 #!/bin/sh
3 # Copyright (c) 2005 Junio C Hamano
6 test_description='git apply symlinks and partial files
10 TEST_PASSES_SANITIZE_LEAK=true
11 . ./test-lib.sh
13 test_expect_success setup '
15 test_ln_s_add path1/path2/path3/path4/path5 link1 &&
16 git commit -m initial &&
18 git branch side &&
20 rm -f link? &&
22 test_ln_s_add htap6 link1 &&
23 git commit -m second &&
25 git diff-tree -p HEAD^ HEAD >patch &&
26 git apply --stat --summary patch
30 test_expect_success SYMLINKS 'apply symlink patch' '
32 git checkout side &&
33 git apply patch &&
34 git diff-files -p >patched &&
35 test_cmp patch patched
39 test_expect_success 'apply --index symlink patch' '
41 git checkout -f side &&
42 git apply --index patch &&
43 git diff-index --cached -p HEAD >patched &&
44 test_cmp patch patched
48 test_done