Merge branch 'nd/t1509-chroot-test'
[gitweb.git] / t / t5551-http-fetch-smart.sh
index 7f6eb9f3db853d33bd1cfaba06348842f0ea3925..66439e58fcf4b08a43ef417b054ae476ffbe3aea 100755 (executable)
@@ -83,7 +83,7 @@ test_expect_success 'clone http repository' '
 test_expect_success 'fetch changes via http' '
        echo content >>file &&
        git commit -a -m two &&
-       git push public
+       git push public &&
        (cd clone && git pull) &&
        test_cmp file clone/file
 '
@@ -169,7 +169,7 @@ test_expect_success 'GIT_SMART_HTTP can disable smart http' '
 '
 
 test_expect_success 'invalid Content-Type rejected' '
-       test_must_fail git clone $HTTPD_URL/broken_smart/repo.git 2>actual
+       test_must_fail git clone $HTTPD_URL/broken_smart/repo.git 2>actual &&
        grep "not valid:" actual
 '
 
@@ -209,10 +209,21 @@ test_expect_success 'cookies stored in http.cookiefile when http.savecookies set
        git config http.cookiefile cookies.txt &&
        git config http.savecookies true &&
        git ls-remote $HTTPD_URL/smart_cookies/repo.git master &&
-       tail -3 cookies.txt > cookies_tail.txt
+       tail -3 cookies.txt >cookies_tail.txt &&
        test_cmp expect_cookies.txt cookies_tail.txt
 '
 
+test_expect_success 'transfer.hiderefs works over smart-http' '
+       test_commit hidden &&
+       test_commit visible &&
+       git push public HEAD^:refs/heads/a HEAD:refs/heads/b &&
+       git --git-dir="$HTTPD_DOCUMENT_ROOT_PATH/repo.git" \
+               config transfer.hiderefs refs/heads/a &&
+       git clone --bare "$HTTPD_URL/smart/repo.git" hidden.git &&
+       test_must_fail git -C hidden.git rev-parse --verify a &&
+       git -C hidden.git rev-parse --verify b
+'
+
 test_expect_success 'create 2,000 tags in the repo' '
        (
        cd "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&