r->parsed_objects->obj_hash_size = new_hash_size;
}
-void *create_object_the_repository(const unsigned char *sha1, void *o)
+void *create_object(struct repository *r, const unsigned char *sha1, void *o)
{
struct object *obj = o;
obj->flags = 0;
hashcpy(obj->oid.hash, sha1);
- if (the_repository->parsed_objects->obj_hash_size - 1 <= the_repository->parsed_objects->nr_objs * 2)
- grow_object_hash(the_repository);
+ if (r->parsed_objects->obj_hash_size - 1 <= r->parsed_objects->nr_objs * 2)
+ grow_object_hash(r);
- insert_obj_hash(obj, the_repository->parsed_objects->obj_hash,
- the_repository->parsed_objects->obj_hash_size);
- the_repository->parsed_objects->nr_objs++;
+ insert_obj_hash(obj, r->parsed_objects->obj_hash,
+ r->parsed_objects->obj_hash_size);
+ r->parsed_objects->nr_objs++;
return obj;
}