diff options
author | Tay Ray Chuan <rctay89@gmail.com> | 2009-06-06 16:43:24 +0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-06-06 10:56:27 -0700 |
commit | 86d99f6d5ce1120b23a2453168165ac45e039411 (patch) | |
tree | 0d8f16d4832e3be4a0cafcb9ed60739da07a9f99 | |
parent | 242a90778bb8740ffa7957b462a2c6a5f0b0278e (diff) | |
download | git-86d99f6d5ce1120b23a2453168165ac45e039411.tar.gz git-86d99f6d5ce1120b23a2453168165ac45e039411.tar.xz |
t5540-http-push: test fetching of packed objects
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-x | t/t5540-http-push.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/t/t5540-http-push.sh b/t/t5540-http-push.sh index 65a41dbe5..ad0f14b93 100755 --- a/t/t5540-http-push.sh +++ b/t/t5540-http-push.sh @@ -83,6 +83,26 @@ test_expect_failure 'http-push fetches unpacked objects' ' git push -f -v $HTTPD_URL/test_repo_unpacked.git master) ' +test_expect_failure 'http-push fetches packed objects' ' + cp -R "$HTTPD_DOCUMENT_ROOT_PATH"/test_repo.git \ + "$HTTPD_DOCUMENT_ROOT_PATH"/test_repo_packed.git && + + git clone $HTTPD_URL/test_repo_packed.git \ + "$ROOT_PATH"/test_repo_clone_packed && + + (cd "$HTTPD_DOCUMENT_ROOT_PATH"/test_repo_packed.git && + git --bare repack && + git --bare prune-packed) && + + # By reset, we force git to retrieve the packed object + (cd "$ROOT_PATH"/test_repo_clone_packed && + git reset --hard HEAD^ && + git remote rm origin && + git reflog expire --expire=0 --all && + git prune && + git push -f -v $HTTPD_URL/test_repo_packed.git master) +' + test_expect_success 'create and delete remote branch' ' cd "$ROOT_PATH"/test_repo_clone && git checkout -b dev && |