Merge branch 'jc/http-curlver-warnings'
authorJunio C Hamano <gitster@pobox.com>
Fri, 2 Nov 2018 15:53:59 +0000 (00:53 +0900)
committerJunio C Hamano <gitster@pobox.com>
Fri, 2 Nov 2018 15:53:59 +0000 (00:53 +0900)
Warning message fix.

* jc/http-curlver-warnings:
http: give curl version warnings consistently

1  2 
http.c
diff --combined http.c
index 28009ca73ac859160ea8aa34ac8b3ace8692e1e2,2214100e3b6688f79432cf8dc1a609e22f0ccf23..3dc8c560d65e7acebb22f63e797406e38afc6422
--- 1/http.c
--- 2/http.c
+++ b/http.c
@@@ -834,8 -834,7 +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
        }
  
        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);
@@@ -2463,7 -2461,7 +2461,7 @@@ int finish_http_object_request(struct h
                unlink_or_warn(freq->tmpfile.buf);
                return -1;
        }
 -      if (hashcmp(freq->sha1, freq->real_sha1)) {
 +      if (!hasheq(freq->sha1, freq->real_sha1)) {
                unlink_or_warn(freq->tmpfile.buf);
                return -1;
        }