Skip to content

Commit c059c87

Browse files
ttaylorrgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 245a7f2 commit c059c87

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

pack-bitmap-write.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,8 @@ int bitmap_writer_has_bitmapped_object_id(struct bitmap_writer *writer,
140140
* Compute the actual bitmaps
141141
*/
142142

143-
static inline void push_bitmapped_commit(struct bitmap_writer *writer,
144-
struct commit *commit,
145-
unsigned pseudo_merge)
143+
void bitmap_writer_push_commit(struct bitmap_writer *writer,
144+
struct commit *commit, unsigned pseudo_merge)
146145
{
147146
if (writer->selected_nr >= writer->selected_alloc) {
148147
writer->selected_alloc = (writer->selected_alloc + 32) * 2;
@@ -664,7 +663,7 @@ void bitmap_writer_select_commits(struct bitmap_writer *writer,
664663

665664
if (indexed_commits_nr < 100) {
666665
for (i = 0; i < indexed_commits_nr; ++i)
667-
push_bitmapped_commit(writer, indexed_commits[i], 0);
666+
bitmap_writer_push_commit(writer, indexed_commits[i], 0);
668667
return;
669668
}
670669

@@ -697,7 +696,7 @@ void bitmap_writer_select_commits(struct bitmap_writer *writer,
697696
}
698697
}
699698

700-
push_bitmapped_commit(writer, chosen, 0);
699+
bitmap_writer_push_commit(writer, chosen, 0);
701700

702701
i += next + 1;
703702
display_progress(writer->progress, i);

pack-bitmap.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@ void bitmap_writer_build_type_index(struct bitmap_writer *writer,
127127
uint32_t index_nr);
128128
int bitmap_writer_has_bitmapped_object_id(struct bitmap_writer *writer,
129129
const struct object_id *oid);
130+
void bitmap_writer_push_commit(struct bitmap_writer *writer,
131+
struct commit *commit, unsigned pseudo_merge);
130132
uint32_t *create_bitmap_mapping(struct bitmap_index *bitmap_git,
131133
struct packing_data *mapping);
132134
int rebuild_bitmap(const uint32_t *reposition,

0 commit comments

Comments
 (0)