Merge branch 'db/delta-applier' into svn-fe
[gitweb.git] / t / t5400-send-pack.sh
index c718253673ec8b3baf635c4dc0b05fe127c6f4cd..b0b2684a1f879cc173bf2bc67902724ed8f25d48 100755 (executable)
@@ -94,6 +94,29 @@ test_expect_success 'refuse deleting push with denyDeletes' '
        test_must_fail git send-pack ./victim :extra master
 '
 
+test_expect_success 'cannot override denyDeletes with git -c send-pack' '
+       (
+               cd victim &&
+               test_might_fail git branch -D extra &&
+               git config receive.denyDeletes true &&
+               git branch extra master
+       ) &&
+       test_must_fail git -c receive.denyDeletes=false \
+                                       send-pack ./victim :extra master
+'
+
+test_expect_success 'override denyDeletes with git -c receive-pack' '
+       (
+               cd victim &&
+               test_might_fail git branch -D extra &&
+               git config receive.denyDeletes true &&
+               git branch extra master
+       ) &&
+       git send-pack \
+               --receive-pack="git -c receive.denyDeletes=false receive-pack" \
+               ./victim :extra master
+'
+
 test_expect_success 'denyNonFastforwards trumps --force' '
        (
            cd victim &&
@@ -106,7 +129,7 @@ test_expect_success 'denyNonFastforwards trumps --force' '
        test "$victim_orig" = "$victim_head"
 '
 
-test_expect_success 'push --all excludes remote tracking hierarchy' '
+test_expect_success 'push --all excludes remote-tracking hierarchy' '
        mkdir parent &&
        (
            cd parent &&