From: Jonathan Nieder Date: Thu, 26 Sep 2013 19:30:44 +0000 (-0700) Subject: Merge branch 'js/xread-in-full' into maint X-Git-Tag: v1.8.4.1~3 X-Git-Url: https://www.git.lorimer.id.au/gitweb.git/diff_plain/be5e85016f8d3eb1045837cc3e114ed211cb0f91?hp=31d757d5122438c76e2578c7e6bad2ed4f4eee89 Merge branch 'js/xread-in-full' into maint * js/xread-in-full: stream_to_pack: xread does not guarantee to read all requested bytes --- diff --git a/bulk-checkin.c b/bulk-checkin.c index 6b0b6d4904..118c62528b 100644 --- a/bulk-checkin.c +++ b/bulk-checkin.c @@ -114,7 +114,7 @@ static int stream_to_pack(struct bulk_checkin_state *state, if (size && !s.avail_in) { ssize_t rsize = size < sizeof(ibuf) ? size : sizeof(ibuf); - if (xread(fd, ibuf, rsize) != rsize) + if (read_in_full(fd, ibuf, rsize) != rsize) die("failed to read %d bytes from '%s'", (int)rsize, path); offset += rsize;