summaryrefslogtreecommitdiff
path: root/t/t5515/refs.br-branches-one-merge_branches-one
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2015-11-02 17:10:27 -0500
committerLibravatar Junio C Hamano <gitster@pobox.com>2015-11-02 14:19:54 -0800
commitf8117f550b900b0bc93364ecadbed237b0ffe25e (patch)
treefc7ecfd195cdf0ec49a438f886734132faa18a9e /t/t5515/refs.br-branches-one-merge_branches-one
parenthttp.c: use CURLOPT_RANGE for range requests (diff)
downloadtgif-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 't/t5515/refs.br-branches-one-merge_branches-one')
0 files changed, 0 insertions, 0 deletions