packfile: pass down repository to for_each_packed_object
The function `for_each_packed_object` currently relies on the global variable `the_repository`. To eliminate global variable usage in `packfile.c`, we should progressively shift the dependency on the_repository to higher layers. Let's remove its usage from this function and closely related function `is_promisor_object`. Signed-off-by: Karthik Nayak <karthik.188@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
cc656f4eb2
commit
c87910b96b
@ -324,7 +324,7 @@ int add_unseen_recent_objects_to_traversal(struct rev_info *revs,
|
||||
if (ignore_in_core_kept_packs)
|
||||
flags |= FOR_EACH_OBJECT_SKIP_IN_CORE_KEPT_PACKS;
|
||||
|
||||
r = for_each_packed_object(add_recent_packed, &data, flags);
|
||||
r = for_each_packed_object(revs->repo, add_recent_packed, &data, flags);
|
||||
|
||||
done:
|
||||
oidset_clear(&data.extra_recent_oids);
|
||||
|
Reference in New Issue
Block a user