3 # Copyright (c) 2007 Shawn O. Pearce
6 test_description
='git apply -p handling.'
10 test_expect_success setup
'
16 git diff >patch.file &&
21 test_expect_success
'apply git diff with -p2' '
22 git apply -p2 patch.file
25 test_expect_success
'apply with too large -p' '
26 test_must_fail git apply --stat -p3 patch.file 2>err &&
27 grep "removing 3 leading" err