Code

Merge branch 'bg/maint-remote-update-default' into maint
[git.git] / t / t4014-format-patch.sh
index 5689d590fd80e0c664000f573c64262b54243982..3bc1cccf8869aef26e175e207dc2923d3ddb1e65 100755 (executable)
@@ -549,9 +549,12 @@ test_expect_success 'options no longer allowed for format-patch' '
        test_cmp expect.check output'
 
 test_expect_success 'format-patch --numstat should produce a patch' '
-       git format-patch --numstat --stdout master..side |
-       grep "^diff --git a/" |
-       wc -l |
-       xargs test 6 = '
+       git format-patch --numstat --stdout master..side > output &&
+       test 6 = $(grep "^diff --git a/" output | wc -l)'
+
+test_expect_success 'format-patch -- <path>' '
+       git format-patch master..side -- file 2>error &&
+       ! grep "Use .--" error
+'
 
 test_done