]> git.ipfire.org Git - thirdparty/git.git/blame - t/t4121-apply-diffs.sh
Merge branch 'jk/rev-list-disk-usage'
[thirdparty/git.git] / t / t4121-apply-diffs.sh
CommitLineData
0afa7644
AR
1#!/bin/sh
2
5be60078 3test_description='git apply for contextually independent diffs'
8f37854b 4GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
334afbc7
JS
5export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
6
0afa7644
AR
7. ./test-lib.sh
8
9echo '1
102
113
124
135
146
157
168' >file
17
18test_expect_success 'setup' \
19 'git add file &&
20 git commit -q -m 1 &&
21 git checkout -b test &&
22 mv file file.tmp &&
23 echo 0 >file &&
24 cat file.tmp >>file &&
25 rm file.tmp &&
26 git commit -a -q -m 2 &&
27 echo 9 >>file &&
28 git commit -a -q -m 3 &&
8f37854b 29 git checkout main'
0afa7644
AR
30
31test_expect_success \
32 'check if contextually independent diffs for the same file apply' \
f957f03b 33 '( git diff test~2 test~1 && git diff test~1 test~0 )| git apply'
0afa7644
AR
34
35test_done