pack-bitmap: make bitmap_writer_push_bitmapped_commit()
public
The pseudo-merge selection code will be added in a subsequent commit, and will need a way to push the allocated commit structures into the bitmap writer from a separate compilation unit. Make the `bitmap_writer_push_bitmapped_commit()` function part of the pack-bitmap.h header in order to make this possible. Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
245a7f2e01
commit
c059c8795e
@ -140,9 +140,8 @@ int bitmap_writer_has_bitmapped_object_id(struct bitmap_writer *writer,
|
|||||||
* Compute the actual bitmaps
|
* Compute the actual bitmaps
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static inline void push_bitmapped_commit(struct bitmap_writer *writer,
|
void bitmap_writer_push_commit(struct bitmap_writer *writer,
|
||||||
struct commit *commit,
|
struct commit *commit, unsigned pseudo_merge)
|
||||||
unsigned pseudo_merge)
|
|
||||||
{
|
{
|
||||||
if (writer->selected_nr >= writer->selected_alloc) {
|
if (writer->selected_nr >= writer->selected_alloc) {
|
||||||
writer->selected_alloc = (writer->selected_alloc + 32) * 2;
|
writer->selected_alloc = (writer->selected_alloc + 32) * 2;
|
||||||
@ -664,7 +663,7 @@ void bitmap_writer_select_commits(struct bitmap_writer *writer,
|
|||||||
|
|
||||||
if (indexed_commits_nr < 100) {
|
if (indexed_commits_nr < 100) {
|
||||||
for (i = 0; i < indexed_commits_nr; ++i)
|
for (i = 0; i < indexed_commits_nr; ++i)
|
||||||
push_bitmapped_commit(writer, indexed_commits[i], 0);
|
bitmap_writer_push_commit(writer, indexed_commits[i], 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -697,7 +696,7 @@ void bitmap_writer_select_commits(struct bitmap_writer *writer,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
push_bitmapped_commit(writer, chosen, 0);
|
bitmap_writer_push_commit(writer, chosen, 0);
|
||||||
|
|
||||||
i += next + 1;
|
i += next + 1;
|
||||||
display_progress(writer->progress, i);
|
display_progress(writer->progress, i);
|
||||||
|
@ -127,6 +127,8 @@ void bitmap_writer_build_type_index(struct bitmap_writer *writer,
|
|||||||
uint32_t index_nr);
|
uint32_t index_nr);
|
||||||
int bitmap_writer_has_bitmapped_object_id(struct bitmap_writer *writer,
|
int bitmap_writer_has_bitmapped_object_id(struct bitmap_writer *writer,
|
||||||
const struct object_id *oid);
|
const struct object_id *oid);
|
||||||
|
void bitmap_writer_push_commit(struct bitmap_writer *writer,
|
||||||
|
struct commit *commit, unsigned pseudo_merge);
|
||||||
uint32_t *create_bitmap_mapping(struct bitmap_index *bitmap_git,
|
uint32_t *create_bitmap_mapping(struct bitmap_index *bitmap_git,
|
||||||
struct packing_data *mapping);
|
struct packing_data *mapping);
|
||||||
int rebuild_bitmap(const uint32_t *reposition,
|
int rebuild_bitmap(const uint32_t *reposition,
|
||||||
|
Loading…
Reference in New Issue
Block a user