delta-islands: stop depending on the_repository

There are multiple sites in "delta-islands.c" where we use the
global `the_repository` variable, either explicitly or implicitly by
using `the_hash_algo`.

Refactor the code to stop using `the_repository`. In most cases this is
trivial because we already had a repository available in the calling
context, with the only exception being `propagate_island_marks()`. Adapt
it so that the repository gets passed in via a parameter.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Patrick Steinhardt
2025-03-10 08:13:28 +01:00
committed by Junio C Hamano
parent f6e174b2d8
commit 19be71db9c
3 changed files with 8 additions and 10 deletions

View File

@@ -12,7 +12,7 @@ void resolve_tree_islands(struct repository *r,
int progress,
struct packing_data *to_pack);
void load_delta_islands(struct repository *r, int progress);
void propagate_island_marks(struct commit *commit);
void propagate_island_marks(struct repository *r, struct commit *commit);
int compute_pack_layers(struct packing_data *to_pack);
void free_island_marks(void);