summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-05-23 05:38:16 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-05-23 05:38:16 (GMT)
commitfcb6df325468a7ae12949ab80dcd37772b9b1fbf (patch)
tree7ae13a8a1c4f7b417403b6f7f64f34a9565dbab2 /cache.h
parentd0f7b22b5bf0847a6e0fe039feb598819dffab4c (diff)
parent9d98354f48997faf8251c566d909957f6ae427d5 (diff)
downloadgit-fcb6df325468a7ae12949ab80dcd37772b9b1fbf.zip
git-fcb6df325468a7ae12949ab80dcd37772b9b1fbf.tar.gz
git-fcb6df325468a7ae12949ab80dcd37772b9b1fbf.tar.bz2
Merge branch 'sb/oid-object-info'
The codepath around object-info API has been taught to take the repository object (which in turn tells the API which object store the objects are to be located). * sb/oid-object-info: cache.h: allow oid_object_info to handle arbitrary repositories packfile: add repository argument to cache_or_unpack_entry packfile: add repository argument to unpack_entry packfile: add repository argument to read_object packfile: add repository argument to packed_object_info packfile: add repository argument to packed_to_object_type packfile: add repository argument to retry_bad_packed_offset cache.h: add repository argument to oid_object_info cache.h: add repository argument to oid_object_info_extended
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/cache.h b/cache.h
index 2fabadd..f436744 100644
--- a/cache.h
+++ b/cache.h
@@ -1199,7 +1199,7 @@ static inline void *read_object_file(const struct object_id *oid, enum object_ty
}
/* Read and unpack an object file into memory, write memory to an object file */
-extern int oid_object_info(const struct object_id *, unsigned long *);
+int oid_object_info(struct repository *r, const struct object_id *, unsigned long *);
extern int hash_object_file(const void *buf, unsigned long len,
const char *type, struct object_id *oid);
@@ -1680,7 +1680,10 @@ struct object_info {
#define OBJECT_INFO_QUICK 8
/* Do not check loose object */
#define OBJECT_INFO_IGNORE_LOOSE 16
-extern int oid_object_info_extended(const struct object_id *, struct object_info *, unsigned flags);
+
+int oid_object_info_extended(struct repository *r,
+ const struct object_id *,
+ struct object_info *, unsigned flags);
/*
* Set this to 0 to prevent sha1_object_info_extended() from fetching missing