summaryrefslogtreecommitdiff
path: root/object-store.h
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2018-11-14 00:12:46 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-11-14 08:22:40 (GMT)
commita3b72c89bdd10f8b22d7dae382f0ce9833e5d179 (patch)
treeac94e5ddd57b0be50068cb8f8923a3ef3daaccd4 /object-store.h
parent33b94066f27199071abaa4067d29a98bbbbdae11 (diff)
downloadgit-a3b72c89bdd10f8b22d7dae382f0ce9833e5d179.zip
git-a3b72c89bdd10f8b22d7dae382f0ce9833e5d179.tar.gz
git-a3b72c89bdd10f8b22d7dae382f0ce9833e5d179.tar.bz2
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.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/object-store.h b/object-store.h
index 63b7605..3d98a68 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 */