]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t5551-http-fetch-smart.sh
Sync with Git 2.45.2
[thirdparty/git.git] / t / t5551-http-fetch-smart.sh
index e069737b80b7bd906afa1963f7b818ffac8ed2ca..a623a1058cd2acddcfca4b6712dcfa41e56dbb67 100755 (executable)
@@ -733,4 +733,22 @@ test_expect_success 'no empty path components' '
        ! grep "//" log
 '
 
+test_expect_success 'tag following always works over v0 http' '
+       upstream=$HTTPD_DOCUMENT_ROOT_PATH/tags &&
+       git init "$upstream" &&
+       (
+               cd "$upstream" &&
+               git commit --allow-empty -m base &&
+               git tag not-annotated &&
+               git tag -m foo annotated
+       ) &&
+       git init tags &&
+       git -C tags -c protocol.version=0 \
+               fetch --depth 1 $HTTPD_URL/smart/tags \
+               refs/tags/annotated:refs/tags/annotated &&
+       git -C "$upstream" for-each-ref refs/tags >expect &&
+       git -C tags for-each-ref >actual &&
+       test_cmp expect actual
+'
+
 test_done