X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft4014-format-patch.sh;h=3bc1cccf8869aef26e175e207dc2923d3ddb1e65;hb=66276d972c0682d49773c20ca67c33bdab9ab76d;hp=74e5b63bbf7895f383323917c614679afd2d29b1;hpb=dda8f4bf2b159d6f8e6d816e35418708cc6f21a1;p=git.git diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh index 74e5b63bb..3bc1cccf8 100755 --- a/t/t4014-format-patch.sh +++ b/t/t4014-format-patch.sh @@ -536,6 +536,22 @@ test_expect_success 'format-patch --signoff' ' grep "^Signed-off-by: $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>" ' +echo "fatal: --name-only does not make sense" > expect.name-only +echo "fatal: --name-status does not make sense" > expect.name-status +echo "fatal: --check does not make sense" > expect.check + +test_expect_success 'options no longer allowed for format-patch' ' + test_must_fail git format-patch --name-only 2> output && + test_cmp expect.name-only output && + test_must_fail git format-patch --name-status 2> output && + test_cmp expect.name-status output && + test_must_fail git format-patch --check 2> output && + test_cmp expect.check output' + +test_expect_success 'format-patch --numstat should produce a patch' ' + git format-patch --numstat --stdout master..side > output && + test 6 = $(grep "^diff --git a/" output | wc -l)' + test_expect_success 'format-patch -- ' ' git format-patch master..side -- file 2>error && ! grep "Use .--" error