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>
This commit is contained in:

committed by
Junio C Hamano

parent
7ecd869060
commit
0df8e96566
2
object.c
2
object.c
@ -257,7 +257,7 @@ struct object *parse_object(const struct object_id *oid)
|
||||
|
||||
if ((obj && obj->type == OBJ_BLOB && has_object_file(oid)) ||
|
||||
(!obj && has_object_file(oid) &&
|
||||
oid_object_info(oid, NULL) == OBJ_BLOB)) {
|
||||
oid_object_info(the_repository, oid, NULL) == OBJ_BLOB)) {
|
||||
if (check_object_signature(repl, NULL, 0, NULL) < 0) {
|
||||
error("sha1 mismatch %s", oid_to_hex(oid));
|
||||
return NULL;
|
||||
|
Reference in New Issue
Block a user