Merge branch 'jc/maint-am-keep' into maint
[gitweb.git] / t / t5550-http-fetch.sh
index b6e6ec96075d8e8485de466c4c5c6f325e7b0d62..0e69324652026bdeeb319c36782fe1130b0510a1 100755 (executable)
@@ -42,5 +42,24 @@ test_expect_success 'fetch changes via http' '
        test_cmp file clone/file
 '
 
+test_expect_success 'http remote detects correct HEAD' '
+       git push public master:other &&
+       (cd clone &&
+        git remote set-head origin -d &&
+        git remote set-head origin -a &&
+        git symbolic-ref refs/remotes/origin/HEAD > output &&
+        echo refs/remotes/origin/master > expect &&
+        test_cmp expect output
+       )
+'
+
+test_expect_success 'fetch packed objects' '
+       cp -R "$HTTPD_DOCUMENT_ROOT_PATH"/repo.git "$HTTPD_DOCUMENT_ROOT_PATH"/repo_pack.git &&
+       cd "$HTTPD_DOCUMENT_ROOT_PATH"/repo_pack.git &&
+       git --bare repack &&
+       git --bare prune-packed &&
+       git clone $HTTPD_URL/repo_pack.git
+'
+
 stop_httpd
 test_done