X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft5400-send-pack.sh;h=6fe2f87b850c1a2d689d5a831084da8915c74ea2;hb=0eb5ebc1d862737ea2b313d0d77d120b3d114099;hp=544771d8fa98ec70d84e5083c2bfc0ebdf45f9a1;hpb=cd50988ae03e086ca1a8f18584153d359699ea25;p=git.git diff --git a/t/t5400-send-pack.sh b/t/t5400-send-pack.sh index 544771d8f..6fe2f87b8 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 &&