summaryrefslogtreecommitdiff
path: root/pack-bitmap-write.c
diff options
context:
space:
mode:
authorJonathan Tan <jonathantanmy@google.com>2018-06-07 19:04:14 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-06-21 19:22:48 (GMT)
commitf3c23db2d7e764b247f7d76a8d0ba180811e9525 (patch)
treeda2cc54ff72aadae315b6a324678bbc9828c1763 /pack-bitmap-write.c
parent3ae5fa0768f7f9781b40b1d40cb2f9f4c753bad4 (diff)
downloadgit-f3c23db2d7e764b247f7d76a8d0ba180811e9525.zip
git-f3c23db2d7e764b247f7d76a8d0ba180811e9525.tar.gz
git-f3c23db2d7e764b247f7d76a8d0ba180811e9525.tar.bz2
pack-bitmap: add free function
Add a function to free struct bitmap_index instances, and use it where needed (except when rebuild_existing_bitmaps() is used, since it creates references to the bitmaps within the struct bitmap_index passed to it). Note that the hashes field in struct bitmap_index is not freed because it points to another field within the same struct. The documentation for that field has been updated to clarify that. Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'pack-bitmap-write.c')
-rw-r--r--pack-bitmap-write.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/pack-bitmap-write.c b/pack-bitmap-write.c
index 03e1225..7896fed 100644
--- a/pack-bitmap-write.c
+++ b/pack-bitmap-write.c
@@ -367,6 +367,10 @@ void bitmap_writer_reuse_bitmaps(struct packing_data *to_pack)
writer.reused = kh_init_sha1();
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)