diff options
| author | Patrick Steinhardt <ps@pks.im> | 2025-03-10 08:13:26 +0100 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-03-10 13:16:19 -0700 |
| commit | 1a6768d1dd6d92b34f25507091ff0775371e19cb (patch) | |
| tree | c9903d22cae345b8e0efe2f36345f656c3838ef8 /pack-bitmap.h | |
| parent | e5957ca321802339c9710acadae2138262701e5d (diff) | |
| download | git-1a6768d1dd6d92b34f25507091ff0775371e19cb.tar.xz | |
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 <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'pack-bitmap.h')
| -rw-r--r-- | pack-bitmap.h | 1 |
1 files changed, 1 insertions, 0 deletions
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; |
