diff options
author | Jonathan Tan <jonathantanmy@google.com> | 2018-06-07 12:04:14 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-06-21 12:22:48 -0700 |
commit | f3c23db2d7e764b247f7d76a8d0ba180811e9525 (patch) | |
tree | da2cc54ff72aadae315b6a324678bbc9828c1763 /pack-bitmap.h | |
parent | 3ae5fa0768f7f9781b40b1d40cb2f9f4c753bad4 (diff) | |
download | git-f3c23db2d7e764b247f7d76a8d0ba180811e9525.tar.gz |
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.h')
-rw-r--r-- | pack-bitmap.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/pack-bitmap.h b/pack-bitmap.h index 19f70043a8..4555907dee 100644 --- a/pack-bitmap.h +++ b/pack-bitmap.h @@ -48,6 +48,7 @@ int reuse_partial_packfile_from_bitmap(struct bitmap_index *, uint32_t *entries, off_t *up_to); int rebuild_existing_bitmaps(struct bitmap_index *, struct packing_data *mapping, khash_sha1 *reused_bitmaps, int show_progress); +void free_bitmap_index(struct bitmap_index *); void bitmap_writer_show_progress(int show); void bitmap_writer_set_checksum(unsigned char *sha1); |