diff options
| author | Karthik Nayak <karthik.188@gmail.com> | 2024-12-03 15:44:00 +0100 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-12-04 08:21:54 +0900 |
| commit | c87910b96b1223d4a1dfe65c04e03863fadef6bc (patch) | |
| tree | 4fbd9e0eda5efb0be743f8b354e19200253d52a1 /builtin/rev-list.c | |
| parent | cc656f4eb2b7b10bc530c96844909c869bdd1fdf (diff) | |
| download | git-c87910b96b1223d4a1dfe65c04e03863fadef6bc.tar.gz | |
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>
Diffstat (limited to 'builtin/rev-list.c')
| -rw-r--r-- | builtin/rev-list.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/rev-list.c b/builtin/rev-list.c index f62bcbf2b1..43c42621e3 100644 --- a/builtin/rev-list.c +++ b/builtin/rev-list.c @@ -121,7 +121,7 @@ static inline void finish_object__ma(struct object *obj) return; case MA_ALLOW_PROMISOR: - if (is_promisor_object(&obj->oid)) + if (is_promisor_object(the_repository, &obj->oid)) return; die("unexpected missing %s object '%s'", type_name(obj->type), oid_to_hex(&obj->oid)); |
