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
@ -550,7 +550,7 @@ typedef int each_packed_object_fn(const struct object_id *oid,
|
||||
int for_each_object_in_pack(struct packed_git *p,
|
||||
each_packed_object_fn, void *data,
|
||||
enum for_each_object_flags flags);
|
||||
int for_each_packed_object(each_packed_object_fn, void *,
|
||||
enum for_each_object_flags flags);
|
||||
int for_each_packed_object(struct repository *repo, each_packed_object_fn cb,
|
||||
void *data, enum for_each_object_flags flags);
|
||||
|
||||
#endif /* OBJECT_STORE_LL_H */
|
||||
|
||||
Reference in New Issue
Block a user