diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-12-22 11:27:22 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-12-22 11:27:22 -0800 |
commit | 200888ef3bbc150cc20b99e0aa039c751c00e07a (patch) | |
tree | 8b1421c5aafe507c8ca50b1b421c8f33cf084d9a /t | |
parent | e443bdfe1e8e1ef8b3665cfd1c1295bd73e13773 (diff) | |
parent | 02f7914734eb8360cf314d887931c5d5ad0d8046 (diff) | |
download | git-200888ef3bbc150cc20b99e0aa039c751c00e07a.tar.gz |
Merge branch 'jk/http-push-to-empty'
* jk/http-push-to-empty:
remote-curl: don't pass back fake refs
Conflicts:
remote-curl.c
Diffstat (limited to 't')
-rwxr-xr-x | t/t5541-http-push.sh | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/t/t5541-http-push.sh b/t/t5541-http-push.sh index a73c82635f..9b85d420c3 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 |