diff options
author | Karthik Nayak <karthik.188@gmail.com> | 2024-12-03 15:43:59 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-12-04 00:21:54 +0100 |
commit | cc656f4eb2b7b10bc530c96844909c869bdd1fdf (patch) | |
tree | 24a6ddb8fa0fde090ead24c5b7961faa453b3803 /pack-bitmap.c | |
parent | packfile: pass down repository to `odb_pack_name` (diff) | |
download | git-cc656f4eb2b7b10bc530c96844909c869bdd1fdf.tar.xz git-cc656f4eb2b7b10bc530c96844909c869bdd1fdf.zip |
packfile: pass down repository to `has_object[_kept]_pack`
The functions `has_object[_kept]_pack` currently rely 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 these
functions and any related ones.
Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'pack-bitmap.c')
-rw-r--r-- | pack-bitmap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pack-bitmap.c b/pack-bitmap.c index 4fa9dfc771..d34ba9909a 100644 --- a/pack-bitmap.c +++ b/pack-bitmap.c @@ -1889,7 +1889,7 @@ static void filter_packed_objects_from_bitmap(struct bitmap_index *bitmap_git, bitmap_unset(result, i); for (i = 0; i < eindex->count; ++i) { - if (has_object_pack(&eindex->objects[i]->oid)) + if (has_object_pack(the_repository, &eindex->objects[i]->oid)) bitmap_unset(result, objects_nr + i); } } |