lookup_unknown_object(): take a repository argument
All of the other lookup_foo() functions take a repository argument, but lookup_unknown_object() was never converted, and it uses the_repository internally. Let's fix that. We could leave a wrapper that uses the_repository, but there aren't that many calls, so we'll just convert them all. I looked briefly at each site to see if we had a repository struct (besides the_repository) we could pass, but none of them do (so this conversion to pass the_repository is a pure noop in each case, though it does take us one step closer to eventually getting rid of the_repository). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
fcc07e980b
commit
45a187cc34
2
refs.c
2
refs.c
@ -337,7 +337,7 @@ static int filter_refs(const char *refname, const struct object_id *oid,
|
||||
|
||||
enum peel_status peel_object(const struct object_id *name, struct object_id *oid)
|
||||
{
|
||||
struct object *o = lookup_unknown_object(name);
|
||||
struct object *o = lookup_unknown_object(the_repository, name);
|
||||
|
||||
if (o->type == OBJ_NONE) {
|
||||
int type = oid_object_info(the_repository, name, NULL);
|
||||
|
||||
Reference in New Issue
Block a user