@@ -3383,7 +3383,7 @@ static int add_object_entry_from_pack(const struct object_id *oid,
struct object_info oi = OBJECT_INFO_INIT;
oi.typep = &type;
- if (packed_object_info(the_repository, p, ofs, &oi) < 0) {
+ if (packed_object_info(revs->repo, p, ofs, &oi) < 0) {
die(_("could not get type of object %s in pack %s"),
oid_to_hex(oid), p->pack_name);
} else if (type == OBJ_COMMIT) {
@@ -1604,7 +1604,7 @@ int packed_object_info(struct repository *r, struct packed_git *p,
goto out;
}
} else
- oidclr(oi->delta_base_oid, the_repository->hash_algo);
+ oidclr(oi->delta_base_oid, r->hash_algo);
}
oi->whence = in_delta_base_cache(p, obj_offset) ? OI_DBCACHED :
The function `packed_object_info` receives a repository struct as an argument. Yet, it still uses the global 'the_repository' variable within, let's swap it with the provided repository variable. Signed-off-by: Karthik Nayak <karthik.188@gmail.com> --- builtin/pack-objects.c | 2 +- packfile.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)