Skip to content

Commit 187504f

Browse files
ttaylorrgitster
authored andcommitted
pack-bitmap-write.c: select pseudo-merges even for small bitmaps
Ordinarily, the pack-bitmap machinery will select some subset of reachable commits to receive bitmaps. But when there are fewer than 100 commits indexed in the first place, they will all receive bitmaps as a special case. When this happens, pseudo-merges are not generated, making it impossible to test pseudo-merge corner cases with fewer than 100 commits. Select pseudo-merges even for bitmaps with fewer than 100 commits to make such testing easier. In practice, this should not make a difference to non-testing bitmaps, as they are unlikely to be used when a repository has so few commits to begin with. Signed-off-by: Taylor Blau <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 11a08e8 commit 187504f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pack-bitmap-write.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -694,6 +694,10 @@ void bitmap_writer_select_commits(struct bitmap_writer *writer,
694694
if (indexed_commits_nr < 100) {
695695
for (i = 0; i < indexed_commits_nr; ++i)
696696
bitmap_writer_push_commit(writer, indexed_commits[i], 0);
697+
698+
select_pseudo_merges(writer, indexed_commits,
699+
indexed_commits_nr);
700+
697701
return;
698702
}
699703

0 commit comments

Comments
 (0)