Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/t/t4121-apply-diffs.sh # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / t / t4121-apply-diffs.sh` 35 lines ยท 643 bytes Raw Blame History 1 #!/bin/sh 2 3 test_description='git apply for contextually independent diffs' 4 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main 5 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME 6 7 . ./test-lib.sh 8 9 echo '1 10 2 11 3 12 4 13 5 14 6 15 7 16 8' >file 17 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 main' 30 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' 34 35 test_done