diff options
Diffstat (limited to 't/t5400-send-pack.sh')
-rwxr-xr-x | t/t5400-send-pack.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/t/t5400-send-pack.sh b/t/t5400-send-pack.sh index 544771d8fa..6fe2f87b85 100755 --- a/t/t5400-send-pack.sh +++ b/t/t5400-send-pack.sh @@ -103,6 +103,17 @@ unset GIT_CONFIG GIT_CONFIG_LOCAL HOME=`pwd`/no-such-directory export HOME ;# this way we force the victim/.git/config to be used. +test_expect_failure \ + '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 && |