tree-diff: rework diff_tree interface to be sha1 based
[gitweb.git] / streaming.c
index debe904523252ae4fd2e18784641575c3f828dd2..d7c9f32f0ce98112ddd4d4a8499b227b181e09e6 100644 (file)
@@ -113,7 +113,7 @@ static enum input_source istream_source(const unsigned char *sha1,
 
        oi->typep = type;
        oi->sizep = &size;
-       status = sha1_object_info_extended(sha1, oi);
+       status = sha1_object_info_extended(sha1, oi, 0);
        if (status < 0)
                return stream_error;
 
@@ -538,7 +538,7 @@ int stream_blob_to_fd(int fd, unsigned const char *sha1, struct stream_filter *f
                        goto close_and_exit;
        }
        if (kept && (lseek(fd, kept - 1, SEEK_CUR) == (off_t) -1 ||
-                    write(fd, "", 1) != 1))
+                    xwrite(fd, "", 1) != 1))
                goto close_and_exit;
        result = 0;