diff options
author | Taylor Blau <me@ttaylorr.com> | 2024-08-15 19:31:08 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-08-15 20:23:15 +0200 |
commit | 11a08e8332762ad0a56c7a92701d85d0d04f94a7 (patch) | |
tree | 4fc70b80b0bdaf742a5a2a46d2c3491ef9851c11 /pack-bitmap-write.c | |
parent | pack-bitmap: drop redundant args from `bitmap_writer_build()` (diff) | |
download | git-11a08e8332762ad0a56c7a92701d85d0d04f94a7.tar.xz git-11a08e8332762ad0a56c7a92701d85d0d04f94a7.zip |
pack-bitmap: drop redundant args from `bitmap_writer_finish()`
In a similar fashion as the previous commit, drop a redundant argument
from the `bitmap_writer_finish()` function.
Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'pack-bitmap-write.c')
-rw-r--r-- | pack-bitmap-write.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pack-bitmap-write.c b/pack-bitmap-write.c index 8d7437955d..346fb29513 100644 --- a/pack-bitmap-write.c +++ b/pack-bitmap-write.c @@ -998,7 +998,6 @@ void bitmap_writer_set_checksum(struct bitmap_writer *writer, void bitmap_writer_finish(struct bitmap_writer *writer, struct pack_idx_entry **index, - uint32_t index_nr, const char *filename, uint16_t options) { @@ -1031,12 +1030,13 @@ void bitmap_writer_finish(struct bitmap_writer *writer, dump_bitmap(f, writer->tags); if (options & BITMAP_OPT_LOOKUP_TABLE) - CALLOC_ARRAY(offsets, index_nr); + CALLOC_ARRAY(offsets, writer->to_pack->nr_objects); for (i = 0; i < bitmap_writer_nr_selected_commits(writer); i++) { struct bitmapped_commit *stored = &writer->selected[i]; int commit_pos = oid_pos(&stored->commit->object.oid, index, - index_nr, oid_access); + writer->to_pack->nr_objects, + oid_access); if (commit_pos < 0) BUG(_("trying to write commit not in index")); @@ -1052,7 +1052,7 @@ void bitmap_writer_finish(struct bitmap_writer *writer, write_lookup_table(writer, f, offsets); if (options & BITMAP_OPT_HASH_CACHE) - write_hash_cache(f, index, index_nr); + write_hash_cache(f, index, writer->to_pack->nr_objects); finalize_hashfile(f, NULL, FSYNC_COMPONENT_PACK_METADATA, CSUM_HASH_IN_STREAM | CSUM_FSYNC | CSUM_CLOSE); |