packfile: pass down repository to has_object[_kept]_pack
The functions `has_object[_kept]_pack` currently rely 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 these functions and any related ones. 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
873b00597b
commit
cc656f4eb2
@ -239,7 +239,7 @@ static int want_recent_object(struct recent_data *data,
|
||||
const struct object_id *oid)
|
||||
{
|
||||
if (data->ignore_in_core_kept_packs &&
|
||||
has_object_kept_pack(oid, IN_CORE_KEEP_PACKS))
|
||||
has_object_kept_pack(data->revs->repo, oid, IN_CORE_KEEP_PACKS))
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user