X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft5541-http-push.sh;h=d37bc1dc58b320d8ec823bba1c232f191467b195;hb=00fb2d25632191b89ac4144e1a6498470a4a1c9e;hp=a73c82635ff6fba6fcef4f139ff09205c1b9b6de;hpb=c31b87d111f6df359255979ea94e8648a51c3647;p=git.git diff --git a/t/t5541-http-push.sh b/t/t5541-http-push.sh index a73c82635..d37bc1dc5 100755 --- a/t/t5541-http-push.sh +++ b/t/t5541-http-push.sh @@ -95,6 +95,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:$LIB_HTTPD_PORT/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 <