diff options
Diffstat (limited to 'pack-bitmap-write.c')
-rw-r--r-- | pack-bitmap-write.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/pack-bitmap-write.c b/pack-bitmap-write.c index 7b2dc3e7dc..f2fd9d81ef 100644 --- a/pack-bitmap-write.c +++ b/pack-bitmap-write.c @@ -1,4 +1,5 @@ #include "cache.h" +#include "object-store.h" #include "commit.h" #include "tag.h" #include "diff.h" @@ -10,6 +11,7 @@ #include "pack-bitmap.h" #include "sha1-lookup.h" #include "pack-objects.h" +#include "commit-reach.h" struct bitmapped_commit { struct commit *commit; @@ -260,7 +262,7 @@ void bitmap_writer_build(struct packing_data *to_pack) if (writer.show_progress) writer.progress = start_progress("Building bitmaps", writer.selected_nr); - init_revisions(&revs, NULL); + repo_init_revisions(the_repository, &revs, NULL); revs.tag_objects = 1; revs.tree_objects = 1; revs.blob_objects = 1; @@ -360,11 +362,17 @@ static int date_compare(const void *_a, const void *_b) void bitmap_writer_reuse_bitmaps(struct packing_data *to_pack) { - if (prepare_bitmap_git() < 0) + struct bitmap_index *bitmap_git; + if (!(bitmap_git = prepare_bitmap_git())) return; writer.reused = kh_init_sha1(); - rebuild_existing_bitmaps(to_pack, writer.reused, writer.show_progress); + rebuild_existing_bitmaps(bitmap_git, to_pack, writer.reused, + writer.show_progress); + /* + * NEEDSWORK: rebuild_existing_bitmaps() makes writer.reused reference + * some bitmaps in bitmap_git, so we can't free the latter. + */ } static struct ewah_bitmap *find_reused_bitmap(const unsigned char *sha1) |