Skip to content

Commit 1a6b42d

Browse files
ttaylorrgitster
authored andcommitted
pack-bitmap.c: apply pseudo-merge commits with incremental MIDXs
Prepare for using pseudo-merges with incremental MIDX bitmaps by attempting to apply pseudo-merges from each layer when encountering a given commit during a walk. Signed-off-by: Taylor Blau <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 171ddb6 commit 1a6b42d

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

pack-bitmap.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1087,10 +1087,15 @@ static unsigned apply_pseudo_merges_for_commit_1(struct bitmap_index *bitmap_git
10871087
struct commit *commit,
10881088
uint32_t commit_pos)
10891089
{
1090-
int ret;
1090+
struct bitmap_index *curr = bitmap_git;
1091+
int ret = 0;
10911092

1092-
ret = apply_pseudo_merges_for_commit(&bitmap_git->pseudo_merges,
1093-
result, commit, commit_pos);
1093+
while (curr) {
1094+
ret += apply_pseudo_merges_for_commit(&curr->pseudo_merges,
1095+
result, commit,
1096+
commit_pos);
1097+
curr = curr->base;
1098+
}
10941099

10951100
if (ret)
10961101
pseudo_merges_satisfied_nr += ret;

0 commit comments

Comments
 (0)