aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTaylor Blau <me@ttaylorr.com>2025-03-20 13:56:56 -0400
committerJunio C Hamano <gitster@pobox.com>2025-03-21 04:34:01 -0700
commite2837e29e62805502ad17ea3b1eae941f8963625 (patch)
treea195033e3ea5f3d4c86345dcbe995fed72831629
parentpack-bitmap.c: compute disk-usage with incremental MIDXs (diff)
downloadgit-e2837e29e62805502ad17ea3b1eae941f8963625.tar.gz
git-e2837e29e62805502ad17ea3b1eae941f8963625.zip
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>
-rw-r--r--pack-bitmap.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/pack-bitmap.c b/pack-bitmap.c
index 4086277de8..1d1e1a65ca 100644
--- a/pack-bitmap.c
+++ b/pack-bitmap.c
@@ -1082,10 +1082,15 @@ static unsigned apply_pseudo_merges_for_commit_1(struct bitmap_index *bitmap_git
struct commit *commit,
uint32_t commit_pos)
{
- int ret;
+ struct bitmap_index *curr = bitmap_git;
+ int ret = 0;
- ret = apply_pseudo_merges_for_commit(&bitmap_git->pseudo_merges,
- result, commit, commit_pos);
+ while (curr) {
+ ret += apply_pseudo_merges_for_commit(&curr->pseudo_merges,
+ result, commit,
+ commit_pos);
+ curr = curr->base;
+ }
if (ret)
pseudo_merges_satisfied_nr += ret;