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/t4123-apply-shrink.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 / t4123-apply-shrink.sh` 46 lines ยท 478 bytes Raw Blame History 1 #!/bin/sh 2 3 test_description='apply a patch that is larger than the preimage' 4 5 . ./test-lib.sh 6 7 cat >F <<\EOF 8 1 9 2 10 3 11 4 12 5 13 6 14 7 15 8 16 999999 17 A 18 B 19 C 20 D 21 E 22 F 23 G 24 H 25 I 26 J 27 28 EOF 29 30 test_expect_success setup ' 31 32 git add F && 33 mv F G && 34 sed -e "s/1/11/" -e "s/999999/9/" -e "s/H/HH/" F && 35 git diff >patch && 36 sed -e "/^\$/d" F && 37 git add F 38 39 ' 40 41 test_expect_success 'apply should fail gracefully' ' 42 test_must_fail git apply --index patch && 43 test_path_is_missing .git/index.lock 44 ' 45 46 test_done