Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'js/xread-in-full' into maint
author
Jonathan Nieder
<jrnieder@gmail.com>
Thu, 26 Sep 2013 19:30:44 +0000
(12:30 -0700)
committer
Jonathan Nieder
<jrnieder@gmail.com>
Thu, 26 Sep 2013 19:30:44 +0000
(12:30 -0700)
* js/xread-in-full:
stream_to_pack: xread does not guarantee to read all requested bytes
bulk-checkin.c
patch
|
blob
|
history
raw
(from parent 1:
31d757d
)
diff --git
a/bulk-checkin.c
b/bulk-checkin.c
index 6b0b6d490440cc59f8ef451c5da9bcff5b3e1563..118c62528b0bb6c919d146d60516825a5336fe75 100644
(file)
--- 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;