object: add repository argument to object_as_type
Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
1ec5bfd24e
commit
1268dfac1e
4
commit.c
4
commit.c
@ -32,7 +32,7 @@ struct commit *lookup_commit_reference_gently(const struct object_id *oid,
|
||||
|
||||
if (!obj)
|
||||
return NULL;
|
||||
return object_as_type(obj, OBJ_COMMIT, quiet);
|
||||
return object_as_type(the_repository, obj, OBJ_COMMIT, quiet);
|
||||
}
|
||||
|
||||
struct commit *lookup_commit_reference(const struct object_id *oid)
|
||||
@ -58,7 +58,7 @@ struct commit *lookup_commit(const struct object_id *oid)
|
||||
if (!obj)
|
||||
return create_object(the_repository, oid->hash,
|
||||
alloc_commit_node(the_repository));
|
||||
return object_as_type(obj, OBJ_COMMIT, 0);
|
||||
return object_as_type(the_repository, obj, OBJ_COMMIT, 0);
|
||||
}
|
||||
|
||||
struct commit *lookup_commit_reference_by_name(const char *name)
|
||||
|
Reference in New Issue
Block a user