X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft5541-http-push.sh;h=d66ed2450854c3091105a43bb2aa0f831140ed1f;hb=38ca63f3c0ef70ba4e41d3b5e347e2c7e7d67fe5;hp=6c9ec6f1171ab39c115230a4b6bb6be3780577c9;hpb=e27d620e919f524ee0bfa0a4d1f35225d3cb867e;p=git.git diff --git a/t/t5541-http-push.sh b/t/t5541-http-push.sh index 6c9ec6f11..d66ed2450 100755 --- a/t/t5541-http-push.sh +++ b/t/t5541-http-push.sh @@ -96,6 +96,32 @@ test_expect_success 'create and delete remote branch' ' test_must_fail git show-ref --verify refs/remotes/origin/dev ' +cat >"$HTTPD_DOCUMENT_ROOT_PATH/test_repo.git/hooks/update" <exp < dev2 (hook declined) +error: failed to push some refs to 'http://127.0.0.1:5541/smart/test_repo.git' +EOF + +test_expect_success 'rejected update prints status' ' + cd "$ROOT_PATH"/test_repo_clone && + git checkout -b dev2 && + : >path4 && + git add path4 && + test_tick && + git commit -m dev2 && + test_must_fail git push origin dev2 2>act && + sed -e "/^remote: /s/ *$//" cmp && + test_cmp exp cmp +' +rm -f "$HTTPD_DOCUMENT_ROOT_PATH/test_repo.git/hooks/update" + cat >exp <