X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft5541-http-push.sh;h=9b85d420c39a0f2192b6b829a6c7912ae28d8e92;hb=b5c12797b442ddf4256332fe4baf709f90bb57a5;hp=a73c82635ff6fba6fcef4f139ff09205c1b9b6de;hpb=7c4f050ae1e140a81f66b5cf92ad2c8673cfda8b;p=git.git diff --git a/t/t5541-http-push.sh b/t/t5541-http-push.sh index a73c82635..9b85d420c 100755 --- a/t/t5541-http-push.sh +++ b/t/t5541-http-push.sh @@ -154,5 +154,37 @@ 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 +' + stop_httpd test_done