From: Junio C Hamano Date: Mon, 30 Nov 2009 22:46:09 +0000 (-0800) Subject: Merge branch 'fc/maint-format-patch-pathspec-dashes' X-Git-Tag: v1.6.6-rc1~8 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=9eba92f684ad9fb1b2e9b99f3f406048fece266d;p=git.git Merge branch 'fc/maint-format-patch-pathspec-dashes' Conflicts: t/t4014-format-patch.sh --- 9eba92f684ad9fb1b2e9b99f3f406048fece266d diff --cc t/t4014-format-patch.sh index 7f267f9ed,437807e41..3bc1cccf8 --- a/t/t4014-format-patch.sh +++ b/t/t4014-format-patch.sh @@@ -536,20 -515,9 +536,25 @@@ test_expect_success 'format-patch --sig 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 + ' + test_done