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>
Tay Ray Chuan committed
Jun 6, 2009 at 16:43 UTC
242a90778bb8740ffa7957b462a2c6a5f0b0278e
1 file changed
+16
t/t5540-http-push.sh
+16
@@ -67,6 +67,22 @@ test_expect_success ' push to remote repository with unpacked refs' '
67
test $HEAD = $(git rev-parse --verify HEAD))
68
'
69
70
+test_expect_failure 'http-push fetches unpacked objects' '
71
+ cp -R "$HTTPD_DOCUMENT_ROOT_PATH"/test_repo.git \
72
+ "$HTTPD_DOCUMENT_ROOT_PATH"/test_repo_unpacked.git &&
73
+
74
+ git clone $HTTPD_URL/test_repo_unpacked.git \
75
+ "$ROOT_PATH"/fetch_unpacked &&
76
+
77
+ # By reset, we force git to retrieve the object
78
+ (cd "$ROOT_PATH"/fetch_unpacked &&
79
+ git reset --hard HEAD^ &&
80
+ git remote rm origin &&
81
+ git reflog expire --expire=0 --all &&
82
+ git prune &&
83
+ git push -f -v $HTTPD_URL/test_repo_unpacked.git master)
84
+'
85
+
86
test_expect_success 'create and delete remote branch' '
87
cd "$ROOT_PATH"/test_repo_clone &&
88
git checkout -b dev &&