]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t5702-protocol-v2.sh
transport: don't flush when disconnecting stateless-rpc helper
[thirdparty/git.git] / t / t5702-protocol-v2.sh
index 011b81d4fc27805c90f5371632c3844011f707af..0ffa3a418c6c65ccababdd1a495cd70d401502a4 100755 (executable)
@@ -652,6 +652,18 @@ test_expect_success 'fetch from namespaced repo respects namespaces' '
        test_cmp expect actual
 '
 
+test_expect_success 'ls-remote with v2 http sends only one POST' '
+       test_when_finished "rm -f log" &&
+
+       git ls-remote "$HTTPD_DOCUMENT_ROOT_PATH/http_parent" >expect &&
+       GIT_TRACE_CURL="$(pwd)/log" git -c protocol.version=2 \
+               ls-remote "$HTTPD_URL/smart/http_parent" >actual &&
+       test_cmp expect actual &&
+
+       grep "Send header: POST" log >posts &&
+       test_line_count = 1 posts
+'
+
 test_expect_success 'push with http:// and a config of v2 does not request v2' '
        test_when_finished "rm -f log" &&
        # Till v2 for push is designed, make sure that if a client has