Start the 2.46 cycle
[git.git] / t / t4123-apply-shrink.sh
blob3601c0c5dca5aa4ac364d19ce1a96f50748cc723
1 #!/bin/sh
3 test_description='apply a patch that is larger than the preimage'
5 TEST_PASSES_SANITIZE_LEAK=true
6 . ./test-lib.sh
8 cat >F <<\EOF
17 999999
29 EOF
31 test_expect_success setup '
33 git add F &&
34 mv F G &&
35 sed -e "s/1/11/" -e "s/999999/9/" -e "s/H/HH/" <G >F &&
36 git diff >patch &&
37 sed -e "/^\$/d" <G >F &&
38 git add F
42 test_expect_success 'apply should fail gracefully' '
43 test_must_fail git apply --index patch &&
44 test_path_is_missing .git/index.lock
47 test_done