mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
http: drop support for curl < 7.11.1
Drop support for this ancient version of curl and simplify the code by
allowing us get rid of some "#ifdef"'s.
Git will not build with vanilla curl older than 7.11.1 due our use of
CURLOPT_POSTFIELDSIZE in 37ee680d9b
(http.postbuffer: allow full range of ssize_t values,
2017-04-11). This field was introduced in curl 7.11.1.
We could solve these compilation problems with more #ifdefs,
but it's not worth the trouble. Version 7.11.1 came out in
March of 2004, over 17 years ago. Let's declare that too old
and drop any existing ifdefs that go further back. One
obvious benefit is that we'll have fewer conditional bits
cluttering the code.
This patch drops all #ifdefs that reference older versions
(note that curl's preprocessor macros are in hex, so we're
looking for 070b01, not 071101).
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
ebf3c04b26
commit
1119a15b5c
@@ -185,8 +185,6 @@ static int set_option(const char *name, const char *value)
|
||||
strbuf_detach(&unquoted, NULL));
|
||||
}
|
||||
return 0;
|
||||
|
||||
#if LIBCURL_VERSION_NUM >= 0x070a08
|
||||
} else if (!strcmp(name, "family")) {
|
||||
if (!strcmp(value, "ipv4"))
|
||||
git_curl_ipresolve = CURL_IPRESOLVE_V4;
|
||||
@@ -197,7 +195,6 @@ static int set_option(const char *name, const char *value)
|
||||
else
|
||||
return -1;
|
||||
return 0;
|
||||
#endif /* LIBCURL_VERSION_NUM >= 0x070a08 */
|
||||
} else if (!strcmp(name, "from-promisor")) {
|
||||
options.from_promisor = 1;
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user