Skip to content

Commit

Permalink
t5540-http-push: test fetching of packed objects
Browse files Browse the repository at this point in the history
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Tay Ray Chuan authored and Junio C Hamano committed Jun 6, 2009
1 parent 242a907 commit 86d99f6
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions t/t5540-http-push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand Down

0 comments on commit 86d99f6

Please sign in to comment.