diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-04-23 22:07:45 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-04-23 22:07:45 -0700 |
commit | 4c01f67d9102942cc7f0a737de4c609a6ac1832e (patch) | |
tree | b1e2e725ac7fb708dba5a732271d45d675ed5bfd /http.c | |
parent | 848d9a9bb7407cd3a2d45941f732b2ddc32588a7 (diff) | |
parent | 37ee680d9b90fe4c4fc5be4e14f17baf49f6ce59 (diff) | |
download | git-4c01f67d9102942cc7f0a737de4c609a6ac1832e.tar.gz |
Merge branch 'dt/http-postbuffer-can-be-large'
Allow the http.postbuffer configuration variable to be set to a
size that can be expressed in size_t, which can be larger than
ulong on some platforms.
* dt/http-postbuffer-can-be-large:
http.postbuffer: allow full range of ssize_t values
Diffstat (limited to 'http.c')
-rw-r--r-- | http.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -19,7 +19,7 @@ long int git_curl_ipresolve; #endif int active_requests; int http_is_verbose; -size_t http_post_buffer = 16 * LARGE_PACKET_MAX; +ssize_t http_post_buffer = 16 * LARGE_PACKET_MAX; #if LIBCURL_VERSION_NUM >= 0x070a06 #define LIBCURL_CAN_HANDLE_AUTH_ANY @@ -331,7 +331,9 @@ static int http_options(const char *var, const char *value, void *cb) } if (!strcmp("http.postbuffer", var)) { - http_post_buffer = git_config_int(var, value); + http_post_buffer = git_config_ssize_t(var, value); + if (http_post_buffer < 0) + warning(_("negative value for http.postbuffer; defaulting to %d"), LARGE_PACKET_MAX); if (http_post_buffer < LARGE_PACKET_MAX) http_post_buffer = LARGE_PACKET_MAX; return 0; |