diff options
author | Jeff King <peff@peff.net> | 2015-11-02 17:10:27 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-11-02 14:19:54 -0800 |
commit | f8117f550b900b0bc93364ecadbed237b0ffe25e (patch) | |
tree | fc7ecfd195cdf0ec49a438f886734132faa18a9e /userdiff.h | |
parent | http.c: use CURLOPT_RANGE for range requests (diff) | |
download | tgif-f8117f550b900b0bc93364ecadbed237b0ffe25e.tar.xz |
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 'userdiff.h')
0 files changed, 0 insertions, 0 deletions