pack-bitmap: initialize bitmap_writer_init()
with packing_data
In order to determine its object order, the pack-bitmap machinery keeps a 'struct packing_data' corresponding to the pack or pseudo-pack (when writing a MIDX bitmap) being written. The to_pack field is provided to the bitmap machinery by callers of bitmap_writer_build() and assigned to the bitmap_writer struct at that point. But a subsequent commit will want to have access to that data earlier on during commit selection. Prepare for that by adding a 'to_pack' argument to 'bitmap_writer_init()', and initializing the field during that function. Subsequent commits will clean up other functions which take now-redundant arguments (like nr_objects, which is equivalent to pdata->objects_nr, or pdata itself). Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
39bf06adf9
commit
01e9d12939
@ -123,7 +123,8 @@ struct bitmap_writer {
|
||||
unsigned char pack_checksum[GIT_MAX_RAWSZ];
|
||||
};
|
||||
|
||||
void bitmap_writer_init(struct bitmap_writer *writer, struct repository *r);
|
||||
void bitmap_writer_init(struct bitmap_writer *writer, struct repository *r,
|
||||
struct packing_data *pdata);
|
||||
void bitmap_writer_show_progress(struct bitmap_writer *writer, int show);
|
||||
void bitmap_writer_set_checksum(struct bitmap_writer *writer,
|
||||
const unsigned char *sha1);
|
||||
|
Reference in New Issue
Block a user