6 #include "pack-objects.h"
8 struct bitmap_disk_entry
{
12 } __attribute__((packed
));
14 struct bitmap_disk_header
{
19 unsigned char checksum
[20];
22 static const char BITMAP_IDX_SIGNATURE
[] = {'B', 'I', 'T', 'M'};
24 #define NEEDS_BITMAP (1u<<22)
26 enum pack_bitmap_opts
{
27 BITMAP_OPT_FULL_DAG
= 1
30 enum pack_bitmap_flags
{
31 BITMAP_FLAG_REUSE
= 0x1
34 typedef int (*show_reachable_fn
)(
35 const unsigned char *sha1
,
36 enum object_type type
,
39 struct packed_git
*found_pack
,
42 int prepare_bitmap_git(void);
43 void count_bitmap_commit_list(uint32_t *commits
, uint32_t *trees
, uint32_t *blobs
, uint32_t *tags
);
44 void traverse_bitmap_commit_list(show_reachable_fn show_reachable
);
45 void test_bitmap_walk(struct rev_info
*revs
);
46 char *pack_bitmap_filename(struct packed_git
*p
);
47 int prepare_bitmap_walk(struct rev_info
*revs
);
48 int reuse_partial_packfile_from_bitmap(struct packed_git
**packfile
, uint32_t *entries
, off_t
*up_to
);
49 int rebuild_existing_bitmaps(struct packing_data
*mapping
, khash_sha1
*reused_bitmaps
, int show_progress
);
51 void bitmap_writer_show_progress(int show
);
52 void bitmap_writer_set_checksum(unsigned char *sha1
);
53 void bitmap_writer_build_type_index(struct pack_idx_entry
**index
, uint32_t index_nr
);
54 void bitmap_writer_reuse_bitmaps(struct packing_data
*to_pack
);
55 void bitmap_writer_select_commits(struct commit
**indexed_commits
,
56 unsigned int indexed_commits_nr
, int max_bitmaps
);
57 void bitmap_writer_build(struct packing_data
*to_pack
);
58 void bitmap_writer_finish(struct pack_idx_entry
**index
,
60 const char *filename
);