6 #include "pack-objects.h"
12 struct bitmap_disk_header {
17 unsigned char checksum[20];
20 static const char BITMAP_IDX_SIGNATURE[] = {'B', 'I', 'T', 'M'};
22 #define NEEDS_BITMAP (1u<<22)
24 enum pack_bitmap_opts {
25 BITMAP_OPT_FULL_DAG = 1,
26 BITMAP_OPT_HASH_CACHE = 4,
29 enum pack_bitmap_flags {
30 BITMAP_FLAG_REUSE = 0x1
33 typedef int (*show_reachable_fn)(
34 const struct object_id *oid,
35 enum object_type type,
38 struct packed_git *found_pack,
43 struct bitmap_index *prepare_bitmap_git(struct repository *r);
44 void count_bitmap_commit_list(struct bitmap_index *, uint32_t *commits,
45 uint32_t *trees, uint32_t *blobs, uint32_t *tags);
46 void traverse_bitmap_commit_list(struct bitmap_index *,
47 show_reachable_fn show_reachable);
48 void test_bitmap_walk(struct rev_info *revs);
49 struct bitmap_index *prepare_bitmap_walk(struct rev_info *revs);
50 int reuse_partial_packfile_from_bitmap(struct bitmap_index *,
51 struct packed_git **packfile,
52 uint32_t *entries, off_t *up_to);
53 int rebuild_existing_bitmaps(struct bitmap_index *, struct packing_data *mapping,
54 khash_sha1 *reused_bitmaps, int show_progress);
55 void free_bitmap_index(struct bitmap_index *);
58 * After a traversal has been performed by prepare_bitmap_walk(), this can be
59 * queried to see if a particular object was reachable from any of the
60 * objects flagged as UNINTERESTING.
62 int bitmap_has_sha1_in_uninteresting(struct bitmap_index *, const unsigned char *sha1);
64 void bitmap_writer_show_progress(int show);
65 void bitmap_writer_set_checksum(unsigned char *sha1);
66 void bitmap_writer_build_type_index(struct packing_data *to_pack,
67 struct pack_idx_entry **index,
69 void bitmap_writer_reuse_bitmaps(struct packing_data *to_pack);
70 void bitmap_writer_select_commits(struct commit **indexed_commits,
71 unsigned int indexed_commits_nr, int max_bitmaps);
72 void bitmap_writer_build(struct packing_data *to_pack);
73 void bitmap_writer_finish(struct pack_idx_entry **index,