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
@ -193,8 +193,9 @@ const struct packed_git *has_packed_and_bad(struct repository *, const struct ob
|
||||
int find_pack_entry(struct repository *r, const struct object_id *oid, struct pack_entry *e);
|
||||
int find_kept_pack_entry(struct repository *r, const struct object_id *oid, unsigned flags, struct pack_entry *e);
|
||||
|
||||
int has_object_pack(const struct object_id *oid);
|
||||
int has_object_kept_pack(const struct object_id *oid, unsigned flags);
|
||||
int has_object_pack(struct repository *r, const struct object_id *oid);
|
||||
int has_object_kept_pack(struct repository *r, const struct object_id *oid,
|
||||
unsigned flags);
|
||||
|
||||
/*
|
||||
* Return 1 if an object in a promisor packfile is or refers to the given
|
||||
|
Reference in New Issue
Block a user