X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft5400-send-pack.sh;h=c718253673ec8b3baf635c4dc0b05fe127c6f4cd;hb=c00cf45fa35d8aaa31c479ae7502286837fc4dc6;hp=f2d5581b12f7d70c9f346da75dced81e12bd4c7f;hpb=35da43e9bb4a5d7542c2ee27e0a3557ac921e3ab;p=git.git diff --git a/t/t5400-send-pack.sh b/t/t5400-send-pack.sh index f2d5581b1..c71825367 100755 --- a/t/t5400-send-pack.sh +++ b/t/t5400-send-pack.sh @@ -32,7 +32,7 @@ test_expect_success setup ' done && git update-ref HEAD "$commit" && git clone ./. victim && - ( cd victim && git log ) && + ( cd victim && git config receive.denyCurrentBranch warn && git log ) && git update-ref HEAD "$zero" && parent=$zero && i=0 && @@ -129,6 +129,7 @@ rewound_push_setup() { cd parent && git init && echo one >file && git add file && git commit -m one && + git config receive.denyCurrentBranch warn && echo two >file && git commit -a -m two ) && git clone parent child && @@ -190,16 +191,11 @@ test_expect_success 'pushing wildcard refspecs respects forcing' ' test "$parent_head" = "$child_head" ' -test_expect_success 'warn pushing to delete current branch' ' +test_expect_success 'deny pushing to delete current branch' ' rewound_push_setup && ( cd child && - git send-pack ../parent :refs/heads/master 2>errs - ) && - grep "warning: to refuse deleting" child/errs && - ( - cd parent && - test_must_fail git rev-parse --verify master + test_must_fail git send-pack ../parent :refs/heads/master 2>errs ) '