diff options
Diffstat (limited to 'pack-bitmap-write.c')
-rw-r--r-- | pack-bitmap-write.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/pack-bitmap-write.c b/pack-bitmap-write.c index f4ecdf8..c6c8f94 100644 --- a/pack-bitmap-write.c +++ b/pack-bitmap-write.c @@ -4,12 +4,9 @@ #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" @@ -198,6 +195,13 @@ struct bb_commit { unsigned idx; /* within selected array */ }; +static void clear_bb_commit(struct bb_commit *commit) +{ + free_commit_list(commit->reverse_edges); + bitmap_free(commit->commit_mask); + bitmap_free(commit->bitmap); +} + define_commit_slab(bb_data, struct bb_commit); struct bitmap_builder { @@ -339,7 +343,7 @@ next: static void bitmap_builder_clear(struct bitmap_builder *bb) { - clear_bb_data(&bb->data); + deep_clear_bb_data(&bb->data, clear_bb_commit); free(bb->commits); bb->commits_nr = bb->commits_alloc = 0; } @@ -366,7 +370,7 @@ static int fill_bitmap_tree(struct bitmap *bitmap, if (parse_tree(tree) < 0) die("unable to load tree object %s", oid_to_hex(&tree->object.oid)); - init_tree_desc(&desc, tree->buffer, tree->size); + init_tree_desc(&desc, &tree->object.oid, tree->buffer, tree->size); while (tree_entry(&desc, &entry)) { switch (object_type(entry.mode)) { |