]> git.ipfire.org Git - thirdparty/git.git/commitdiff
pack-bitmap: drop repository argument from prepare_midx_bitmap_git()
authorJeff King <peff@peff.net>
Thu, 9 Sep 2021 19:56:58 +0000 (15:56 -0400)
committerJunio C Hamano <gitster@pobox.com>
Fri, 10 Sep 2021 00:32:37 +0000 (17:32 -0700)
We never look at the repository argument which is passed. This makes
sense, since the multi_pack_index struct already tells us everything we
need to access the files in its associated object directory.

Signed-off-by: Jeff King <peff@peff.net>
Reviewed-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
midx.c
pack-bitmap.c
pack-bitmap.h

diff --git a/midx.c b/midx.c
index ccdc3e5702f17f63872eaf7d7340aa131c1cab0d..864034a6ade5fdc61f7287227767de01b31b0267 100644 (file)
--- a/midx.c
+++ b/midx.c
@@ -1144,7 +1144,7 @@ static int write_midx_internal(const char *object_dir,
                int bitmap_exists;
                int want_bitmap = flags & MIDX_WRITE_BITMAP;
 
-               bitmap_git = prepare_midx_bitmap_git(the_repository, ctx.m);
+               bitmap_git = prepare_midx_bitmap_git(ctx.m);
                bitmap_exists = bitmap_git && bitmap_is_midx(bitmap_git);
                free_bitmap_index(bitmap_git);
 
index fa69ed7a6dfee9cb06cc5b0ec6f12238dc92be12..f2a7994a9ccf553262d5f5050026dda558532fc8 100644 (file)
@@ -517,8 +517,7 @@ struct bitmap_index *prepare_bitmap_git(struct repository *r)
        return NULL;
 }
 
-struct bitmap_index *prepare_midx_bitmap_git(struct repository *r,
-                                            struct multi_pack_index *midx)
+struct bitmap_index *prepare_midx_bitmap_git(struct multi_pack_index *midx)
 {
        struct bitmap_index *bitmap_git = xcalloc(1, sizeof(*bitmap_git));
 
index 81664f933f02a093cc5d5036250b06156f37a0d9..469090bad2cf170670edc7e6a9ea66a51cc25482 100644 (file)
@@ -44,8 +44,7 @@ typedef int (*show_reachable_fn)(
 struct bitmap_index;
 
 struct bitmap_index *prepare_bitmap_git(struct repository *r);
-struct bitmap_index *prepare_midx_bitmap_git(struct repository *r,
-                                            struct multi_pack_index *midx);
+struct bitmap_index *prepare_midx_bitmap_git(struct multi_pack_index *midx);
 void count_bitmap_commit_list(struct bitmap_index *, uint32_t *commits,
                              uint32_t *trees, uint32_t *blobs, uint32_t *tags);
 void traverse_bitmap_commit_list(struct bitmap_index *,