From 1a6768d1dd6d92b34f25507091ff0775371e19cb Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Mon, 10 Mar 2025 08:13:26 +0100 Subject: pack-bitmap-write: stop depending on `the_repository` There are multiple sites in "pack-bitmap-write.c" where we use the global `the_repository` variable, either explicitly or implicitly by using `the_hash_algo`. Refactor the code so that the `struct bitmap_writer` stores the repository it is getting initialized with. Like this, we can adapt callsites that use `the_repository` to instead use the repository provided by the writer. Remove the `USE_THE_REPOSITORY_VARIABLE` define. Signed-off-by: Patrick Steinhardt Signed-off-by: Junio C Hamano --- pack-bitmap.h | 1 + 1 file changed, 1 insertion(+) (limited to 'pack-bitmap.h') diff --git a/pack-bitmap.h b/pack-bitmap.h index d7f4b8b8e9..53cd42772f 100644 --- a/pack-bitmap.h +++ b/pack-bitmap.h @@ -104,6 +104,7 @@ int bitmap_has_oid_in_uninteresting(struct bitmap_index *, const struct object_i off_t get_disk_usage_from_bitmap(struct bitmap_index *, struct rev_info *); struct bitmap_writer { + struct repository *repo; struct ewah_bitmap *commits; struct ewah_bitmap *trees; struct ewah_bitmap *blobs; -- cgit v1.3