]>
Commit | Line | Data |
---|---|---|
0afa7644 AR |
1 | #!/bin/sh |
2 | ||
5be60078 | 3 | test_description='git apply for contextually independent diffs' |
0afa7644 AR |
4 | . ./test-lib.sh |
5 | ||
6 | echo '1 | |
7 | 2 | |
8 | 3 | |
9 | 4 | |
10 | 5 | |
11 | 6 | |
12 | 7 | |
13 | 8' >file | |
14 | ||
15 | test_expect_success 'setup' \ | |
16 | 'git add file && | |
17 | git commit -q -m 1 && | |
18 | git checkout -b test && | |
19 | mv file file.tmp && | |
20 | echo 0 >file && | |
21 | cat file.tmp >>file && | |
22 | rm file.tmp && | |
23 | git commit -a -q -m 2 && | |
24 | echo 9 >>file && | |
25 | git commit -a -q -m 3 && | |
26 | git checkout master' | |
27 | ||
28 | test_expect_success \ | |
29 | 'check if contextually independent diffs for the same file apply' \ | |
f957f03b | 30 | '( git diff test~2 test~1 && git diff test~1 test~0 )| git apply' |
0afa7644 AR |
31 | |
32 | test_done |