packfile: allow has_packed_and_bad to handle arbitrary repositories
has_packed_and_bad is not widely used, so just migrate it all at once. Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
1b9b5c695e
commit
33b94066f2
@ -1432,7 +1432,7 @@ void *read_object_file_extended(const struct object_id *oid,
|
||||
die(_("loose object %s (stored in %s) is corrupt"),
|
||||
oid_to_hex(repl), path);
|
||||
|
||||
if ((p = has_packed_and_bad(repl->hash)) != NULL)
|
||||
if ((p = has_packed_and_bad(the_repository, repl->hash)) != NULL)
|
||||
die(_("packed object %s (stored in %s) is corrupt"),
|
||||
oid_to_hex(repl), p->pack_name);
|
||||
|
||||
|
Reference in New Issue
Block a user