fsck: git receive-pack: support excluding objects from fsck'ing
[gitweb.git] / t / t5504-fetch-receive-strict.sh
index 720c1215224009afac856ea10be6ae153c27d1ce..44f3d5fb284e9848180df9ed9cfbc44a91762277 100755 (executable)
@@ -123,6 +123,18 @@ committer Bugs Bunny <bugs@bun.ni> 1234567890 +0000
 This commit object intentionally broken
 EOF
 
+test_expect_success 'push with receive.fsck.skipList' '
+       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.skipList SKIP &&
+       echo $commit >dst/.git/SKIP &&
+       git push --porcelain dst bogus
+'
+
 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 &&