t5702: use test_commit_bulk
[gitweb.git] / streaming.c
index 891f82f51a753d065ce67b111bce86e790801599..fcd63032192ff4056946ce3a0a266c7fb021353b 100644 (file)
@@ -338,16 +338,16 @@ static struct stream_vtbl loose_vtbl = {
 
 static open_method_decl(loose)
 {
-       st->u.loose.mapped = map_sha1_file(the_repository,
-                                          oid->hash, &st->u.loose.mapsize);
+       st->u.loose.mapped = map_loose_object(the_repository,
+                                             oid, &st->u.loose.mapsize);
        if (!st->u.loose.mapped)
                return -1;
-       if ((unpack_sha1_header(&st->z,
-                               st->u.loose.mapped,
-                               st->u.loose.mapsize,
-                               st->u.loose.hdr,
-                               sizeof(st->u.loose.hdr)) < 0) ||
-           (parse_sha1_header(st->u.loose.hdr, &st->size) < 0)) {
+       if ((unpack_loose_header(&st->z,
+                                st->u.loose.mapped,
+                                st->u.loose.mapsize,
+                                st->u.loose.hdr,
+                                sizeof(st->u.loose.hdr)) < 0) ||
+           (parse_loose_header(st->u.loose.hdr, &st->size) < 0)) {
                git_inflate_end(&st->z);
                munmap(st->u.loose.mapped, st->u.loose.mapsize);
                return -1;