object-store: allow read_object_file_extended to read from any repo
read_object_file_extended is not widely used, so 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
33b94066f2
commit
a3b72c89bd
@ -161,12 +161,13 @@ void sha1_file_name(struct repository *r, struct strbuf *buf, const unsigned cha
|
||||
|
||||
void *map_sha1_file(struct repository *r, const unsigned char *sha1, unsigned long *size);
|
||||
|
||||
extern void *read_object_file_extended(const struct object_id *oid,
|
||||
extern void *read_object_file_extended(struct repository *r,
|
||||
const struct object_id *oid,
|
||||
enum object_type *type,
|
||||
unsigned long *size, int lookup_replace);
|
||||
static inline void *read_object_file(const struct object_id *oid, enum object_type *type, unsigned long *size)
|
||||
{
|
||||
return read_object_file_extended(oid, type, size, 1);
|
||||
return read_object_file_extended(the_repository, oid, type, size, 1);
|
||||
}
|
||||
|
||||
/* Read and unpack an object file into memory, write memory to an object file */
|
||||
|
Reference in New Issue
Block a user