aboutsummaryrefslogtreecommitdiffstats
path: root/promisor-remote.c
diff options
authorKarthik Nayak <karthik.188@gmail.com>2024-12-03 15:44:00 +0100
committerJunio C Hamano <gitster@pobox.com>2024-12-04 08:21:54 +0900
commitc87910b96b1223d4a1dfe65c04e03863fadef6bc (patch)
tree4fbd9e0eda5efb0be743f8b354e19200253d52a1 /promisor-remote.c
parentcc656f4eb2b7b10bc530c96844909c869bdd1fdf (diff)
downloadgit-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 'promisor-remote.c')
-rw-r--r--promisor-remote.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/promisor-remote.c b/promisor-remote.c
index 9345ae3db2..c714f4f007 100644
--- a/promisor-remote.c
+++ b/promisor-remote.c
@@ -283,7 +283,7 @@ void promisor_remote_get_direct(struct repository *repo,
}
for (i = 0; i < remaining_nr; i++) {
- if (is_promisor_object(&remaining_oids[i]))
+ if (is_promisor_object(repo, &remaining_oids[i]))
die(_("could not fetch %s from promisor remote"),
oid_to_hex(&remaining_oids[i]));
}