From: Jeff King Date: Tue, 17 Jan 2023 03:04:38 +0000 (-0500) Subject: http-push: prefer CURLOPT_UPLOAD to CURLOPT_PUT X-Git-Tag: v2.34.7~2^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4fab049258a294e375431e07f343d1752994fba3;p=thirdparty%2Fgit.git http-push: prefer CURLOPT_UPLOAD to CURLOPT_PUT The two options do exactly the same thing, but the latter has been deprecated and in recent versions of curl may produce a compiler warning. Since the UPLOAD form is available everywhere (it was introduced in the year 2000 by curl 7.1), we can just switch to it. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano Signed-off-by: Johannes Schindelin --- diff --git a/http-push.c b/http-push.c index 3309aaf004..331af5ffcb 100644 --- a/http-push.c +++ b/http-push.c @@ -198,7 +198,7 @@ static void curl_setup_http(CURL *curl, const char *url, const char *custom_req, struct buffer *buffer, curl_write_callback write_fn) { - curl_easy_setopt(curl, CURLOPT_PUT, 1); + curl_easy_setopt(curl, CURLOPT_UPLOAD, 1); curl_easy_setopt(curl, CURLOPT_URL, url); curl_easy_setopt(curl, CURLOPT_INFILE, buffer); curl_easy_setopt(curl, CURLOPT_INFILESIZE, buffer->buf.len);