t/t0211-trace2-perf.sh: fix typo patern -> pattern
[alt-git.git] / t / t4123-apply-shrink.sh
blob3ef84619f53e27ddc164d74c07c0a38721dedfdf
1 #!/bin/sh
3 test_description='apply a patch that is larger than the preimage'
5 . ./test-lib.sh
7 cat >F <<\EOF
16 999999
28 EOF
30 test_expect_success setup '
32 git add F &&
33 mv F G &&
34 sed -e "s/1/11/" -e "s/999999/9/" -e "s/H/HH/" <G >F &&
35 git diff >patch &&
36 sed -e "/^\$/d" <G >F &&
37 git add F
41 test_expect_success 'apply should fail gracefully' '
42 test_must_fail git apply --index patch &&
43 test_path_is_missing .git/index.lock
46 test_done