dir.c: remove an implicit dependency on the_index in pathspec code
[gitweb.git] / builtin / fast-export.c
index a16aeaa826f90a6f7e20f8e7e0e5137d1c3006bc..223499d7ca4616553c6a7029f6534634f2fa93a5 100644 (file)
@@ -230,13 +230,13 @@ static void export_blob(const struct object_id *oid)
        if (is_null_oid(oid))
                return;
 
-       object = lookup_object(oid->hash);
+       object = lookup_object(the_repository, oid->hash);
        if (object && object->flags & SHOWN)
                return;
 
        if (anonymize) {
                buf = anonymize_blob(&size);
-               object = (struct object *)lookup_blob(oid);
+               object = (struct object *)lookup_blob(the_repository, oid);
                eaten = 0;
        } else {
                buf = read_object_file(oid, &type, &size);
@@ -244,7 +244,8 @@ static void export_blob(const struct object_id *oid)
                        die ("Could not read blob %s", oid_to_hex(oid));
                if (check_object_signature(oid, buf, size, type_name(type)) < 0)
                        die("sha1 mismatch in blob %s", oid_to_hex(oid));
-               object = parse_object_buffer(oid, type, size, buf, &eaten);
+               object = parse_object_buffer(the_repository, oid, type,
+                                            size, buf, &eaten);
        }
 
        if (!object)
@@ -402,7 +403,8 @@ static void show_filemodify(struct diff_queue_struct *q,
                                                   anonymize_sha1(&spec->oid) :
                                                   spec->oid.hash));
                        else {
-                               struct object *object = lookup_object(spec->oid.hash);
+                               struct object *object = lookup_object(the_repository,
+                                                                     spec->oid.hash);
                                printf("M %06o :%d ", spec->mode,
                                       get_object_mark(object));
                        }
@@ -961,7 +963,7 @@ static void import_marks(char *input_file)
                        /* only commits */
                        continue;
 
-               commit = lookup_commit(&oid);
+               commit = lookup_commit(the_repository, &oid);
                if (!commit)
                        die("not a commit? can't happen: %s", oid_to_hex(&oid));