git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] http: give curl version warnings consistently

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 25, 2018, 03:29 UTC
Message-ID
<xmqqsh0uln5c.fsf_-_@gitster-ct.c.googlers.com>
In-Reply-To
<xmqqzhv2lnn6.fsf@gitster-ct.c.googlers.com>

When a requested feature cannot be activated because the version of cURL library used to build Git with is too old, most of the codepaths give a warning like "$Feature is not supported with cURL < $Version", marked for l10n. A few of them, however, did not follow that pattern and said things like "$Feature is not activated, your curl version is too old (>= $Version)", and without marking them for l10n.

Update these to match the style of the majority of warnings and mark them for l10n.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 > I have a clean-up suggestion related to this but is orthogonal to
 > this three-patch series (after the fix-up is applied, anyway), which
 > I'll be sending out separately.
 So, here it is.
 http.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/http.c b/http.c
index 43e75ac583..2214100e3b 100644
--- a/http.c
+++ b/http.c
@@ -834,8 +834,7 @@ static CURL *get_curl_handle(void)
 #if LIBCURL_VERSION_NUM >= 0x072c00
 		curl_easy_setopt(result, CURLOPT_SSL_OPTIONS, CURLSSLOPT_NO_REVOKE);
 #else
-		warning("CURLSSLOPT_NO_REVOKE not applied to curl SSL options because\n"
-			"your curl version is too old (< 7.44.0)");
+		warning(_("CURLSSLOPT_NO_REVOKE not suported with cURL < 7.44.0"));
 #endif
 	}
 
@@ -908,8 +907,7 @@ static CURL *get_curl_handle(void)
 	curl_easy_setopt(result, CURLOPT_PROTOCOLS,
 			 get_curl_allowed_protocols(-1));
 #else
-	warning("protocol restrictions not applied to curl redirects because\n"
-		"your curl version is too old (>= 7.19.4)");
+	warning(_("Protocol restrictions not supported with cURL < 7.19.4"));
 #endif
 	if (getenv("GIT_CURL_VERBOSE"))
 		curl_easy_setopt(result, CURLOPT_VERBOSE, 1L);
-- 
2.19.1-542-gc4df23f792
Previous: Junio C HamanoNext: Jeff King
Message 8 of 28 in “Allow choosing the SSL backend cURL uses (plus related patches)”
  1. 0/3 Allow choosing the SSL backend cURL uses (plus related patches)Johannes Schindelin via GitGitGadget, Oct 15, 2018
  2. 1/3 http: add support for selecting SSL backends at runtimeJohannes Schindelin via GitGitGadget, Oct 15, 2018
  3. Eric SunshineOct 15, 2018
  4. 2/3 http: add support for disabling SSL revocation checks in cURLBrendan Forster via GitGitGadget, Oct 15, 2018
  5. Eric SunshineOct 15, 2018
  6. Johannes SchindelinOct 16, 2018
  7. Junio C HamanoOct 25, 2018
  8. http: give curl version warnings consistentlyJunio C Hamano, Oct 25, 2018
  9. Jeff KingOct 25, 2018
  10. Johannes SchindelinOct 25, 2018
  11. Junio C HamanoOct 26, 2018
  12. Johannes SchindelinOct 25, 2018
  13. Junio C HamanoOct 16, 2018
  14. Jeff KingOct 16, 2018
  15. Johannes SchindelinOct 16, 2018
  16. Jeff KingOct 16, 2018
  17. Johannes SchindelinOct 16, 2018
  18. Junio C HamanoOct 18, 2018
  19. Johannes SchindelinOct 25, 2018
  20. Junio C HamanoOct 26, 2018
  21. 3/3 http: when using Secure Channel, ignore sslCAInfo by defaultJohannes Schindelin via GitGitGadget, Oct 15, 2018
  22. 0/3 Allow choosing the SSL backend cURL uses (plus related patches)Johannes Schindelin via GitGitGadget, Oct 25, 2018
  23. 1/3 http: add support for selecting SSL backends at runtimeJohannes Schindelin via GitGitGadget, Oct 25, 2018
  24. Ævar Arnfjörð BjarmasonDec 13, 2018
  25. Johannes SchindelinDec 13, 2018
  26. Johannes SchindelinDec 13, 2018
  27. 2/3 http: add support for disabling SSL revocation checks in cURLBrendan Forster via GitGitGadget, Oct 25, 2018
  28. 3/3 http: when using Secure Channel, ignore sslCAInfo by defaultJohannes Schindelin via GitGitGadget, Oct 25, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.