Add optional parameters to the diff option "--ignore-submodules"
[git/debian.git] / t / t4120-apply-popt.sh
blobb463b4f05ce43ee345a0594528d684befe7c2ef3
1 #!/bin/sh
3 # Copyright (c) 2007 Shawn O. Pearce
6 test_description='git apply -p handling.'
8 . ./test-lib.sh
10 test_expect_success setup '
11 mkdir sub &&
12 echo A >sub/file1 &&
13 cp sub/file1 file1 &&
14 git add sub/file1 &&
15 echo B >sub/file1 &&
16 git diff >patch.file &&
17 rm sub/file1 &&
18 rmdir sub
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
30 test_done