blob: aff551a1d787477eb2db34d96217f66ca03c435d [file] [log] [blame]
Alex Riesen0afa7642007-04-18 23:58:56 +02001#!/bin/sh
2
Junio C Hamano5be60072007-07-02 22:52:14 -07003test_description='git apply for contextually independent diffs'
Alex Riesen0afa7642007-04-18 23:58:56 +02004. ./test-lib.sh
5
6echo '1
72
83
94
105
116
127
138' >file
14
15test_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
28test_expect_success \
29 'check if contextually independent diffs for the same file apply' \
30 '( git diff test~2 test~1; git diff test~1 test~0 )| git apply'
31
32test_done