packfile: allow find_pack_entry to handle arbitrary repositories
[gitweb.git] / streaming.c
index c8b85e4498eaedee4142cbe543174ae639cae8e8..22d27df55ebb0926967c1b1afe027d6c112820ae 100644 (file)
@@ -3,6 +3,9 @@
  */
 #include "cache.h"
 #include "streaming.h"
+#include "repository.h"
+#include "object-store.h"
+#include "packfile.h"
 
 enum input_source {
        stream_error = -1,
@@ -334,7 +337,8 @@ static struct stream_vtbl loose_vtbl = {
 
 static open_method_decl(loose)
 {
-       st->u.loose.mapped = map_sha1_file(sha1, &st->u.loose.mapsize);
+       st->u.loose.mapped = map_sha1_file(the_repository,
+                                          sha1, &st->u.loose.mapsize);
        if (!st->u.loose.mapped)
                return -1;
        if ((unpack_sha1_header(&st->z,