Skip to content

Commit bfbb60d

Browse files
peffgitster
authored andcommitted
pack-bitmap: drop repository argument from prepare_midx_bitmap_git()
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 <[email protected]> Reviewed-by: Taylor Blau <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 2d59597 commit bfbb60d

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

midx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1144,7 +1144,7 @@ static int write_midx_internal(const char *object_dir,
11441144
int bitmap_exists;
11451145
int want_bitmap = flags & MIDX_WRITE_BITMAP;
11461146

1147-
bitmap_git = prepare_midx_bitmap_git(the_repository, ctx.m);
1147+
bitmap_git = prepare_midx_bitmap_git(ctx.m);
11481148
bitmap_exists = bitmap_git && bitmap_is_midx(bitmap_git);
11491149
free_bitmap_index(bitmap_git);
11501150

pack-bitmap.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -517,8 +517,7 @@ struct bitmap_index *prepare_bitmap_git(struct repository *r)
517517
return NULL;
518518
}
519519

520-
struct bitmap_index *prepare_midx_bitmap_git(struct repository *r,
521-
struct multi_pack_index *midx)
520+
struct bitmap_index *prepare_midx_bitmap_git(struct multi_pack_index *midx)
522521
{
523522
struct bitmap_index *bitmap_git = xcalloc(1, sizeof(*bitmap_git));
524523

pack-bitmap.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ typedef int (*show_reachable_fn)(
4444
struct bitmap_index;
4545

4646
struct bitmap_index *prepare_bitmap_git(struct repository *r);
47-
struct bitmap_index *prepare_midx_bitmap_git(struct repository *r,
48-
struct multi_pack_index *midx);
47+
struct bitmap_index *prepare_midx_bitmap_git(struct multi_pack_index *midx);
4948
void count_bitmap_commit_list(struct bitmap_index *, uint32_t *commits,
5049
uint32_t *trees, uint32_t *blobs, uint32_t *tags);
5150
void traverse_bitmap_commit_list(struct bitmap_index *,

0 commit comments

Comments
 (0)