Skip to content

Commit 01e08e4

Browse files
peffgitster
authored andcommitted
http: #error on too-old curl
We already fail to build with versions of curl older than 7.19.4. But doing an explicit check with an #error has two benefits. One is that it makes it clear to users that the build failure is intentional, so they don't waste time trying to debug it. And two is that it documents our current "too old" assumption, so that we know whether we need use an #ifdef when using newer curl features in future patches. Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent f93c0b1 commit 01e08e4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

http.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
#include "remote.h"
1111
#include "url.h"
1212

13+
#if LIBCURL_VERSION_NUM < 0x071304
14+
#error "your libcurl version is too old; Git requires curl >= 7.19.4"
15+
#endif
16+
1317
#define DEFAULT_MAX_REQUESTS 5
1418

1519
struct slot_results {

0 commit comments

Comments
 (0)