tests: mark tests relying on the current default for `init.defaultBranch`
[alt-git.git] / t / t4121-apply-diffs.sh
blob60deb3bf78eba010eaa67b50f56cb22d998e6e5c
1 #!/bin/sh
3 test_description='git apply for contextually independent diffs'
4 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
5 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
7 . ./test-lib.sh
9 echo '1
16 8' >file
18 test_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 &&
29 git checkout master'
31 test_expect_success \
32 'check if contextually independent diffs for the same file apply' \
33 '( git diff test~2 test~1 && git diff test~1 test~0 )| git apply'
35 test_done