summaryrefslogtreecommitdiff
path: root/t/t5400-send-pack.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t5400-send-pack.sh')
-rwxr-xr-xt/t5400-send-pack.sh13
1 files changed, 12 insertions, 1 deletions
diff --git a/t/t5400-send-pack.sh b/t/t5400-send-pack.sh
index 544771d8fa..b21317d685 100755
--- a/t/t5400-send-pack.sh
+++ b/t/t5400-send-pack.sh
@@ -99,11 +99,22 @@ test_expect_success \
! test -f victim/.git/refs/heads/extra
'
-unset GIT_CONFIG GIT_CONFIG_LOCAL
+unset GIT_CONFIG
HOME=`pwd`/no-such-directory
export HOME ;# this way we force the victim/.git/config to be used.
test_expect_success \
+ 'pushing a delete should be denied with denyDeletes' '
+ cd victim &&
+ git config receive.denyDeletes true &&
+ git branch extra master &&
+ cd .. &&
+ test -f victim/.git/refs/heads/extra &&
+ test_must_fail git send-pack ./victim/.git/ :extra master
+'
+rm -f victim/.git/refs/heads/extra
+
+test_expect_success \
'pushing with --force should be denied with denyNonFastforwards' '
cd victim &&
git config receive.denyNonFastforwards true &&