From: Junio C Hamano Date: Mon, 20 Feb 2012 08:14:46 +0000 (-0800) Subject: Merge branch 'cb/maint-t5541-make-server-port-portable' X-Git-Tag: v1.7.10-rc0~74 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/030a360849e9cb2b3c408cbf9d8c980f3aae5868?ds=inline;hp=-c Merge branch 'cb/maint-t5541-make-server-port-portable' * cb/maint-t5541-make-server-port-portable: t5541: check error message against the real port number used --- 030a360849e9cb2b3c408cbf9d8c980f3aae5868 diff --combined t/t5541-http-push.sh index d66ed24508,da0b702639..cc6f081711 --- a/t/t5541-http-push.sh +++ b/t/t5541-http-push.sh @@@ -14,7 -14,6 +14,7 @@@ f ROOT_PATH="$PWD" LIB_HTTPD_PORT=${LIB_HTTPD_PORT-'5541'} . "$TEST_DIRECTORY"/lib-httpd.sh +. "$TEST_DIRECTORY"/lib-terminal.sh start_httpd test_expect_success 'setup remote repository' ' @@@ -106,7 -105,7 +106,7 @@@ cat >exp < dev2 (hook declined) - error: failed to push some refs to 'http://127.0.0.1:5541/smart/test_repo.git' + 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' ' @@@ -183,44 -182,5 +183,44 @@@ test_expect_success 'push (chunked)' test $HEAD = $(git rev-parse --verify HEAD)) ' +test_expect_success 'push --all can push to empty repo' ' + d=$HTTPD_DOCUMENT_ROOT_PATH/empty-all.git && + git init --bare "$d" && + git --git-dir="$d" config http.receivepack true && + git push --all "$HTTPD_URL"/smart/empty-all.git +' + +test_expect_success 'push --mirror can push to empty repo' ' + d=$HTTPD_DOCUMENT_ROOT_PATH/empty-mirror.git && + git init --bare "$d" && + git --git-dir="$d" config http.receivepack true && + git push --mirror "$HTTPD_URL"/smart/empty-mirror.git +' + +test_expect_success 'push --all to repo with alternates' ' + s=$HTTPD_DOCUMENT_ROOT_PATH/test_repo.git && + d=$HTTPD_DOCUMENT_ROOT_PATH/alternates-all.git && + git clone --bare --shared "$s" "$d" && + git --git-dir="$d" config http.receivepack true && + git --git-dir="$d" repack -adl && + git push --all "$HTTPD_URL"/smart/alternates-all.git +' + +test_expect_success 'push --mirror to repo with alternates' ' + s=$HTTPD_DOCUMENT_ROOT_PATH/test_repo.git && + d=$HTTPD_DOCUMENT_ROOT_PATH/alternates-mirror.git && + git clone --bare --shared "$s" "$d" && + git --git-dir="$d" config http.receivepack true && + git --git-dir="$d" repack -adl && + git push --mirror "$HTTPD_URL"/smart/alternates-mirror.git +' + +test_expect_success TTY 'quiet push' ' + cd "$ROOT_PATH"/test_repo_clone && + test_commit quiet && + test_terminal git push --quiet --no-progress 2>&1 | tee output && + test_cmp /dev/null output +' + stop_httpd test_done