aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTay Ray Chuan <rctay89@gmail.com>2009-06-06 16:43:23 +0800
committerJunio C Hamano <gitster@pobox.com>2009-06-06 10:56:27 -0700
commit242a90778bb8740ffa7957b462a2c6a5f0b0278e (patch)
tree3ca6753525b56f3cc1c9fcd2ea3f8adbd2da85e1
parent86079872238041fa0e2aa6b8a94f7881f88e4316 (diff)
downloadgit-242a90778bb8740ffa7957b462a2c6a5f0b0278e.tar.gz
git-242a90778bb8740ffa7957b462a2c6a5f0b0278e.tar.xz
t5540-http-push: test fetching of loose objects
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-xt/t5540-http-push.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/t/t5540-http-push.sh b/t/t5540-http-push.sh
index 5fe479e1c..65a41dbe5 100755
--- a/t/t5540-http-push.sh
+++ b/t/t5540-http-push.sh
@@ -67,6 +67,22 @@ test_expect_success ' push to remote repository with unpacked refs' '
test $HEAD = $(git rev-parse --verify HEAD))
'
+test_expect_failure 'http-push fetches unpacked objects' '
+ cp -R "$HTTPD_DOCUMENT_ROOT_PATH"/test_repo.git \
+ "$HTTPD_DOCUMENT_ROOT_PATH"/test_repo_unpacked.git &&
+
+ git clone $HTTPD_URL/test_repo_unpacked.git \
+ "$ROOT_PATH"/fetch_unpacked &&
+
+ # By reset, we force git to retrieve the object
+ (cd "$ROOT_PATH"/fetch_unpacked &&
+ git reset --hard HEAD^ &&
+ git remote rm origin &&
+ git reflog expire --expire=0 --all &&
+ git prune &&
+ git push -f -v $HTTPD_URL/test_repo_unpacked.git master)
+'
+
test_expect_success 'create and delete remote branch' '
cd "$ROOT_PATH"/test_repo_clone &&
git checkout -b dev &&