summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTaylor Blau <me@ttaylorr.com>2024-08-15 19:31:06 +0200
committerJunio C Hamano <gitster@pobox.com>2024-08-15 20:22:27 +0200
commitf00dda48490c1d5d515cc97b5b3197c0ed1c7ed9 (patch)
tree13a310dc7acf109318056b020bb864a5ed775ac0
parentpack-bitmap: drop redundant args from `bitmap_writer_build_type_index()` (diff)
downloadgit-f00dda48490c1d5d515cc97b5b3197c0ed1c7ed9.tar.xz
git-f00dda48490c1d5d515cc97b5b3197c0ed1c7ed9.zip
pack-bitmap: drop redundant args from `bitmap_writer_build()`
In a similar fashion as the previous commit, drop a redundant argument from the `bitmap_writer_build()` function. Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--builtin/pack-objects.c2
-rw-r--r--midx-write.c2
-rw-r--r--pack-bitmap-write.c9
-rw-r--r--pack-bitmap.h3
4 files changed, 6 insertions, 10 deletions
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c
index c08a62718d..97090433a1 100644
--- a/builtin/pack-objects.c
+++ b/builtin/pack-objects.c
@@ -1367,7 +1367,7 @@ static void write_pack_file(void)
bitmap_writer_select_commits(&bitmap_writer,
indexed_commits,
indexed_commits_nr);
- if (bitmap_writer_build(&bitmap_writer, &to_pack) < 0)
+ if (bitmap_writer_build(&bitmap_writer) < 0)
die(_("failed to write bitmap index"));
bitmap_writer_finish(&bitmap_writer,
written_list, nr_written,
diff --git a/midx-write.c b/midx-write.c
index b3015af07f..1ccdf0df30 100644
--- a/midx-write.c
+++ b/midx-write.c
@@ -846,7 +846,7 @@ static int write_midx_bitmap(const char *midx_name,
index[pack_order[i]] = &pdata->objects[i].idx;
bitmap_writer_select_commits(&writer, commits, commits_nr);
- ret = bitmap_writer_build(&writer, pdata);
+ ret = bitmap_writer_build(&writer);
if (ret < 0)
goto cleanup;
diff --git a/pack-bitmap-write.c b/pack-bitmap-write.c
index 34cdf5f150..8d7437955d 100644
--- a/pack-bitmap-write.c
+++ b/pack-bitmap-write.c
@@ -569,8 +569,7 @@ static void store_selected(struct bitmap_writer *writer,
kh_value(writer->bitmaps, hash_pos) = stored;
}
-int bitmap_writer_build(struct bitmap_writer *writer,
- struct packing_data *to_pack)
+int bitmap_writer_build(struct bitmap_writer *writer)
{
struct bitmap_builder bb;
size_t i;
@@ -581,17 +580,15 @@ int bitmap_writer_build(struct bitmap_writer *writer,
uint32_t *mapping;
int closed = 1; /* until proven otherwise */
- writer->to_pack = to_pack;
-
if (writer->show_progress)
writer->progress = start_progress("Building bitmaps",
writer->selected_nr);
trace2_region_enter("pack-bitmap-write", "building_bitmaps_total",
the_repository);
- old_bitmap = prepare_bitmap_git(to_pack->repo);
+ old_bitmap = prepare_bitmap_git(writer->to_pack->repo);
if (old_bitmap)
- mapping = create_bitmap_mapping(old_bitmap, to_pack);
+ mapping = create_bitmap_mapping(old_bitmap, writer->to_pack);
else
mapping = NULL;
diff --git a/pack-bitmap.h b/pack-bitmap.h
index d2529abadc..0c5b83e954 100644
--- a/pack-bitmap.h
+++ b/pack-bitmap.h
@@ -146,8 +146,7 @@ struct ewah_bitmap *pseudo_merge_bitmap_for_commit(struct bitmap_index *bitmap_g
void bitmap_writer_select_commits(struct bitmap_writer *writer,
struct commit **indexed_commits,
unsigned int indexed_commits_nr);
-int bitmap_writer_build(struct bitmap_writer *writer,
- struct packing_data *to_pack);
+int bitmap_writer_build(struct bitmap_writer *writer);
void bitmap_writer_finish(struct bitmap_writer *writer,
struct pack_idx_entry **index,
uint32_t index_nr,