diff options
Diffstat (limited to 'pack-bitmap-write.c')
-rw-r--r-- | pack-bitmap-write.c | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/pack-bitmap-write.c b/pack-bitmap-write.c index cfa67a510f..be4733e3bd 100644 --- a/pack-bitmap-write.c +++ b/pack-bitmap-write.c @@ -1,18 +1,22 @@ -#include "cache.h" -#include "object-store.h" +#include "git-compat-util.h" +#include "environment.h" +#include "gettext.h" +#include "hex.h" +#include "object-store-ll.h" #include "commit.h" -#include "tag.h" #include "diff.h" #include "revision.h" -#include "list-objects.h" #include "progress.h" -#include "pack-revindex.h" #include "pack.h" #include "pack-bitmap.h" #include "hash-lookup.h" #include "pack-objects.h" +#include "path.h" #include "commit-reach.h" #include "prio-queue.h" +#include "trace2.h" +#include "tree.h" +#include "tree-walk.h" struct bitmapped_commit { struct commit *commit; @@ -406,15 +410,19 @@ static int fill_bitmap_commit(struct bb_commit *ent, if (old_bitmap && mapping) { struct ewah_bitmap *old = bitmap_for_commit(old_bitmap, c); + struct bitmap *remapped = bitmap_new(); /* * If this commit has an old bitmap, then translate that * bitmap and add its bits to this one. No need to walk * parents or the tree for this commit. */ - if (old && !rebuild_bitmap(mapping, old, ent->bitmap)) { + if (old && !rebuild_bitmap(mapping, old, remapped)) { + bitmap_or(ent->bitmap, remapped); + bitmap_free(remapped); reused_bitmaps_nr++; continue; } + bitmap_free(remapped); } /* @@ -425,7 +433,8 @@ static int fill_bitmap_commit(struct bb_commit *ent, if (!found) return -1; bitmap_set(ent->bitmap, pos); - prio_queue_put(tree_queue, get_commit_tree(c)); + prio_queue_put(tree_queue, + repo_get_commit_tree(the_repository, c)); for (p = c->parents; p; p = p->next) { pos = find_object_pos(&p->item->object.oid, &found); |