diff options
author | Stefan Beller <sbeller@google.com> | 2018-11-14 03:12:46 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-11-14 11:22:40 +0300 |
commit | a3b72c89bdd10f8b22d7dae382f0ce9833e5d179 (patch) | |
tree | ac94e5ddd57b0be50068cb8f8923a3ef3daaccd4 /object-store.h | |
parent | 33b94066f27199071abaa4067d29a98bbbbdae11 (diff) |
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>
Diffstat (limited to 'object-store.h')
-rw-r--r-- | object-store.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/object-store.h b/object-store.h index 63b7605a3e..3d98a682b2 100644 --- a/object-store.h +++ b/object-store.h @@ -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 */ |