Git/Packet: clarify that packet_required_key_val_read allows EOF
[gitweb.git] / streaming.c
index 6f1c60f12bc5eea13c4b27cf6c80d690ffe49ab8..5892b50bd89c3c66bdb541ca0100f0671834a542 100644 (file)
@@ -540,7 +540,7 @@ int stream_blob_to_fd(int fd, const struct object_id *oid, struct stream_filter
                        kept = 0;
                wrote = write_in_full(fd, buf, readlen);
 
-               if (wrote != readlen)
+               if (wrote < 0)
                        goto close_and_exit;
        }
        if (kept && (lseek(fd, kept - 1, SEEK_CUR) == (off_t) -1 ||