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:
Jeff King
2021-04-13 03:16:36 -04:00
committed by Junio C Hamano
parent fcc07e980b
commit 45a187cc34
9 changed files with 13 additions and 14 deletions

View File

@ -725,7 +725,7 @@ static int fsck_cache_tree(struct cache_tree *it)
static void mark_object_for_connectivity(const struct object_id *oid)
{
struct object *obj = lookup_unknown_object(oid);
struct object *obj = lookup_unknown_object(the_repository, oid);
obj->flags |= HAS_OBJ;
}