Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-11-21 10:47:10 +0300
committerJunio C Hamano <gitster@pobox.com>2009-11-21 10:47:10 +0300
commit1a02a85d63f280ffaec6977ed2365be92cb80287 (patch)
treefc0cb889551b7c6f297a7a72508357397a4de451 /t
parentaa437791d8b3d5a163777d1cabd1f299654ce712 (diff)
parent2cfa8330e414bc73b01d45f232f8566afc56dd10 (diff)
Merge branch 'bg/format-patch-doc-update'
* bg/format-patch-doc-update: format-patch: Add "--no-stat" as a synonym for "-p" format-patch documentation: Fix formatting format-patch documentation: Remove diff options that are not useful format-patch: Always generate a patch
Diffstat (limited to 't')
-rwxr-xr-xt/t4014-format-patch.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh
index cab6ce2e97..5689d590fd 100755
--- a/t/t4014-format-patch.sh
+++ b/t/t4014-format-patch.sh
@@ -536,4 +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 |
+ grep "^diff --git a/" |
+ wc -l |
+ xargs test 6 = '
+
test_done