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 /commit-graph.c | |
parent | cc656f4eb2b7b10bc530c96844909c869bdd1fdf (diff) |
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 'commit-graph.c')
-rw-r--r-- | commit-graph.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/commit-graph.c b/commit-graph.c index 83dd69bfeb..e2e2083951 100644 --- a/commit-graph.c +++ b/commit-graph.c @@ -1960,7 +1960,7 @@ static void fill_oids_from_all_packs(struct write_commit_graph_context *ctx) ctx->progress = start_delayed_progress( _("Finding commits for commit graph among packed objects"), ctx->approx_nr_objects); - for_each_packed_object(add_packed_commits, ctx, + for_each_packed_object(ctx->r, add_packed_commits, ctx, FOR_EACH_OBJECT_PACK_ORDER); if (ctx->progress_done < ctx->approx_nr_objects) display_progress(ctx->progress, ctx->approx_nr_objects); |