]> git.ipfire.org Git - thirdparty/git.git/blobdiff - streaming.c
object-file.c: make parse_loose_header_extended() public
[thirdparty/git.git] / streaming.c
index 5f480ad50c415cc48a591adb29b46f00b67468d7..8beac62cbb71038a34096acd6f6c1a9b07723779 100644 (file)
@@ -223,6 +223,9 @@ static int open_istream_loose(struct git_istream *st, struct repository *r,
                              const struct object_id *oid,
                              enum object_type *type)
 {
+       struct object_info oi = OBJECT_INFO_INIT;
+       oi.sizep = &st->size;
+
        st->u.loose.mapped = map_loose_object(r, oid, &st->u.loose.mapsize);
        if (!st->u.loose.mapped)
                return -1;
@@ -231,7 +234,7 @@ static int open_istream_loose(struct git_istream *st, struct repository *r,
                                 st->u.loose.mapsize,
                                 st->u.loose.hdr,
                                 sizeof(st->u.loose.hdr)) < 0) ||
-           (parse_loose_header(st->u.loose.hdr, &st->size) < 0)) {
+           (parse_loose_header(st->u.loose.hdr, &oi, 0) < 0)) {
                git_inflate_end(&st->z);
                munmap(st->u.loose.mapped, st->u.loose.mapsize);
                return -1;