summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2018-04-25 11:20:59 -0700
committerJunio C Hamano <gitster@pobox.com>2018-04-26 10:54:27 +0900
commit0df8e96566ddcae4adc4efc096944c064f60b8bd (patch)
tree19c8b0277b21dcd9a9baa71ca5541bd59853afae /cache.h
parent7ecd8690602170f0993923c99645c7c6005e3dfa (diff)
downloadgit-0df8e96566ddcae4adc4efc096944c064f60b8bd.tar.gz
cache.h: add repository argument to oid_object_info
Add a repository argument to allow the callers of oid_object_info to be more specific about which repository to handle. This is a small mechanical change; it doesn't change the implementation to handle repositories other than the_repository yet. As with the previous commits, use a macro to catch callers passing a repository other than the_repository at compile time. Signed-off-by: Stefan Beller <sbeller@google.com> Reviewed-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/cache.h b/cache.h
index 588c4fff9a..6340b2c572 100644
--- a/cache.h
+++ b/cache.h
@@ -1192,7 +1192,8 @@ 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 *);
+#define oid_object_info(r, o, f) oid_object_info_##r(o, f)
+int oid_object_info_the_repository(const struct object_id *, unsigned long *);
extern int hash_object_file(const void *buf, unsigned long len,
const char *type, struct object_id *oid);