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>
Tay Ray Chuan committed
Jun 6, 2009 at 16:43 UTC
86d99f6d5ce1120b23a2453168165ac45e039411
1 file changed
+20
t/t5540-http-push.sh
+20
@@ -83,6 +83,26 @@ test_expect_failure 'http-push fetches unpacked objects' '
83
git push -f -v $HTTPD_URL/test_repo_unpacked.git master)
84
'
85
86
+test_expect_failure 'http-push fetches packed objects' '
87
+ cp -R "$HTTPD_DOCUMENT_ROOT_PATH"/test_repo.git \
88
+ "$HTTPD_DOCUMENT_ROOT_PATH"/test_repo_packed.git &&
89
+
90
+ git clone $HTTPD_URL/test_repo_packed.git \
91
+ "$ROOT_PATH"/test_repo_clone_packed &&
92
+
93
+ (cd "$HTTPD_DOCUMENT_ROOT_PATH"/test_repo_packed.git &&
94
+ git --bare repack &&
95
+ git --bare prune-packed) &&
96
+
97
+ # By reset, we force git to retrieve the packed object
98
+ (cd "$ROOT_PATH"/test_repo_clone_packed &&
99
+ git reset --hard HEAD^ &&
100
+ git remote rm origin &&
101
+ git reflog expire --expire=0 --all &&
102
+ git prune &&
103
+ git push -f -v $HTTPD_URL/test_repo_packed.git master)
104
+'
105
+
106
test_expect_success 'create and delete remote branch' '
107
cd "$ROOT_PATH"/test_repo_clone &&
108
git checkout -b dev &&