summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Nieder <jrnieder@gmail.com>2013-09-26 12:30:44 -0700
committerJonathan Nieder <jrnieder@gmail.com>2013-09-26 12:30:44 -0700
commitbe5e85016f8d3eb1045837cc3e114ed211cb0f91 (patch)
tree8b663977cdc00e310151b419becbd149971c2dcd
parent31d757d5122438c76e2578c7e6bad2ed4f4eee89 (diff)
parente92527c97cfa26bf6e42381cf1b7035950c36e69 (diff)
downloadgit-be5e85016f8d3eb1045837cc3e114ed211cb0f91.tar.gz
Merge branch 'js/xread-in-full' into maint
* js/xread-in-full: stream_to_pack: xread does not guarantee to read all requested bytes
-rw-r--r--bulk-checkin.c2
1 files changed, 1 insertions, 1 deletions
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;