Git fork
at reftables-rust 22 lines 433 B view raw
1#!/bin/sh 2 3test_description='git apply with too-large patch' 4 5. ./test-lib.sh 6 7test_expect_success EXPENSIVE 'git apply rejects patches that are too large' ' 8 sz=$((1024 * 1024 * 1023)) && 9 { 10 cat <<-\EOF && 11 diff --git a/file b/file 12 new file mode 100644 13 --- /dev/null 14 +++ b/file 15 @@ -0,0 +1 @@ 16 EOF 17 test-tool genzeros 18 } | test_copy_bytes $sz | test_must_fail git apply 2>err && 19 grep "patch too large" err 20' 21 22test_done