]>
Commit | Line | Data |
---|---|---|
2c71810b JH |
1 | #!/bin/sh |
2 | # | |
3 | # Copyright (c) 2005 Junio C Hamano | |
4 | # | |
5 | ||
5be60078 | 6 | test_description='git apply symlinks and partial files |
2c71810b JH |
7 | |
8 | ' | |
9 | ||
9081a421 | 10 | TEST_PASSES_SANITIZE_LEAK=true |
2c71810b JH |
11 | . ./test-lib.sh |
12 | ||
889c6f0e | 13 | test_expect_success setup ' |
2c71810b | 14 | |
889c6f0e | 15 | test_ln_s_add path1/path2/path3/path4/path5 link1 && |
2c71810b JH |
16 | git commit -m initial && |
17 | ||
18 | git branch side && | |
19 | ||
20 | rm -f link? && | |
21 | ||
889c6f0e | 22 | test_ln_s_add htap6 link1 && |
2c71810b JH |
23 | git commit -m second && |
24 | ||
25 | git diff-tree -p HEAD^ HEAD >patch && | |
26 | git apply --stat --summary patch | |
27 | ||
28 | ' | |
29 | ||
41be8ea2 | 30 | test_expect_success SYMLINKS 'apply symlink patch' ' |
2c71810b JH |
31 | |
32 | git checkout side && | |
33 | git apply patch && | |
34 | git diff-files -p >patched && | |
3af82863 | 35 | test_cmp patch patched |
2c71810b JH |
36 | |
37 | ' | |
38 | ||
889c6f0e | 39 | test_expect_success 'apply --index symlink patch' ' |
2c71810b JH |
40 | |
41 | git checkout -f side && | |
42 | git apply --index patch && | |
43 | git diff-index --cached -p HEAD >patched && | |
3af82863 | 44 | test_cmp patch patched |
2c71810b JH |
45 | |
46 | ' | |
47 | ||
48 | test_done |