Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/http.h
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2015-11-03 01:10:27 +0300
committerJunio C Hamano <gitster@pobox.com>2015-11-03 01:19:54 +0300
commitf8117f550b900b0bc93364ecadbed237b0ffe25e (patch)
treefc7ecfd195cdf0ec49a438f886734132faa18a9e /http.h
parent835c4d3689972e616bd109cec3dd8cd4aa4d4c0d (diff)
http: use off_t to store partial file size
When we try to resume transfer of a partially-downloaded object or pack, we fopen() the existing file for append, then use ftell() to get the current position. We use a "long", which can hold only 2GB on a 32-bit system, even though packfiles may be larger than that. Let's switch to using off_t, which should hold any file size our system is capable of storing. We need to use ftello() to get the off_t. This is in POSIX and hopefully available everywhere; if not, we should be able to wrap it by falling back to ftell(), which would presumably return "-1" on such a large file (and we would simply skip resuming in that case). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'http.h')
0 files changed, 0 insertions, 0 deletions