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
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2015-06-22 18:26:36 +0300
committerJunio C Hamano <gitster@pobox.com>2015-06-24 00:27:36 +0300
commit70a4ae73d8a6d8d0ce86d746a20bb243d83d28e3 (patch)
tree45eb768de3f933bd14e691cb8ca6cc073aa43a19 /t/t5504-fetch-receive-strict.sh
parent7d7d5b0568e49d9d0dd3b4909572fadca8fc3b06 (diff)
fsck: add a simple test for receive.fsck.<msg-id>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5504-fetch-receive-strict.sh')
-rwxr-xr-xt/t5504-fetch-receive-strict.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/t/t5504-fetch-receive-strict.sh b/t/t5504-fetch-receive-strict.sh
index 69ee13c8be..36024fc51a 100755
--- a/t/t5504-fetch-receive-strict.sh
+++ b/t/t5504-fetch-receive-strict.sh
@@ -115,4 +115,25 @@ test_expect_success 'push with transfer.fsckobjects' '
test_cmp exp act
'
+cat >bogus-commit <<\EOF
+tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904
+author Bugs Bunny 1234567890 +0000
+committer Bugs Bunny <bugs@bun.ni> 1234567890 +0000
+
+This commit object intentionally broken
+EOF
+
+test_expect_success 'push with receive.fsck.missingEmail=warn' '
+ commit="$(git hash-object -t commit -w --stdin <bogus-commit)" &&
+ git push . $commit:refs/heads/bogus &&
+ rm -rf dst &&
+ git init dst &&
+ git --git-dir=dst/.git config receive.fsckobjects true &&
+ test_must_fail git push --porcelain dst bogus &&
+ git --git-dir=dst/.git config \
+ receive.fsck.missingEmail warn &&
+ git push --porcelain dst bogus >act 2>&1 &&
+ grep "missingEmail" act
+'
+
test_done