4 #include "repository.h"
6 struct multi_pack_index
{
7 struct multi_pack_index
*next
;
11 const unsigned char *data
;
15 unsigned char version
;
16 unsigned char hash_len
;
17 unsigned char num_chunks
;
21 const unsigned char *chunk_pack_names
;
22 const uint32_t *chunk_oid_fanout
;
23 const unsigned char *chunk_oid_lookup
;
24 const unsigned char *chunk_object_offsets
;
25 const unsigned char *chunk_large_offsets
;
27 const char **pack_names
;
28 struct packed_git
**packs
;
29 char object_dir
[FLEX_ARRAY
];
32 struct multi_pack_index
*load_multi_pack_index(const char *object_dir
);
33 int bsearch_midx(const struct object_id
*oid
, struct multi_pack_index
*m
, uint32_t *result
);
34 struct object_id
*nth_midxed_object_oid(struct object_id
*oid
,
35 struct multi_pack_index
*m
,
37 int fill_midx_entry(const struct object_id
*oid
, struct pack_entry
*e
, struct multi_pack_index
*m
);
38 int midx_contains_pack(struct multi_pack_index
*m
, const char *idx_name
);
39 int prepare_multi_pack_index_one(struct repository
*r
, const char *object_dir
);
41 int write_midx_file(const char *object_dir
);
42 void clear_midx_file(const char *object_dir
);