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 <me@ttaylorr.com> Acked-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Taylor Blau committed
Mar 20, 2025 at 13:56 UTC
e2837e29e62805502ad17ea3b1eae941f8963625
1 file changed
+8
-3
pack-bitmap.c
+8
-3
@@ -1082,10 +1082,15 @@ static unsigned apply_pseudo_merges_for_commit_1(struct bitmap_index *bitmap_git
1082
struct commit *commit,
1083
uint32_t commit_pos)
1084
{
1085
- int ret;
1085
+ struct bitmap_index *curr = bitmap_git;
1086
+ int ret = 0;
1087
1087
- ret = apply_pseudo_merges_for_commit(&bitmap_git->pseudo_merges,
1088
- result, commit, commit_pos);
1088
+ while (curr) {
1089
+ ret += apply_pseudo_merges_for_commit(&curr->pseudo_merges,
1090
+ result, commit,
1091
+ commit_pos);
1092
+ curr = curr->base;
1093
+ }
1094
1095
if (ret)
1096
pseudo_merges_satisfied_nr += ret;