Git fork

Merge branch 'jk/curl-global-trace-components' into maint-2.51

Adjust to the way newer versions of cURL selectivel enables tracing
options, so that our tests can continue to work.

* jk/curl-global-trace-components:
curl: add support for curl_global_trace() components

+18 -1
+7
git-curl-compat.h
··· 46 46 #endif 47 47 48 48 /** 49 + * curl_global_trace() was added in 8.3.0, released September 2023. 50 + */ 51 + #if LIBCURL_VERSION_NUM >= 0x080300 52 + #define GIT_CURL_HAVE_GLOBAL_TRACE 1 53 + #endif 54 + 55 + /** 49 56 * CURLOPT_TCP_KEEPCNT was added in 8.9.0, released in July, 2024. 50 57 */ 51 58 #if LIBCURL_VERSION_NUM >= 0x080900
+8
http.c
··· 1348 1348 if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) 1349 1349 die("curl_global_init failed"); 1350 1350 1351 + #ifdef GIT_CURL_HAVE_GLOBAL_TRACE 1352 + { 1353 + const char *comp = getenv("GIT_TRACE_CURL_COMPONENTS"); 1354 + if (comp) 1355 + curl_global_trace(comp); 1356 + } 1357 + #endif 1358 + 1351 1359 if (proactive_auth && http_proactive_auth == PROACTIVE_AUTH_NONE) 1352 1360 http_proactive_auth = PROACTIVE_AUTH_IF_CREDENTIALS; 1353 1361
+3 -1
t/t5564-http-proxy.sh
··· 72 72 test_when_finished "rm -rf clone" && 73 73 test_config_global http.proxy "socks4://localhost$PWD/%2530.sock" && { 74 74 { 75 - GIT_TRACE_CURL=$PWD/trace git clone "$HTTPD_URL/smart/repo.git" clone 2>err && 75 + GIT_TRACE_CURL=$PWD/trace \ 76 + GIT_TRACE_CURL_COMPONENTS=socks \ 77 + git clone "$HTTPD_URL/smart/repo.git" clone 2>err && 76 78 grep -i "SOCKS4 request granted" trace 77 79 } || 78 80 old_libcurl_error err