1#ifndef SPLIT_INDEX_H
2#define SPLIT_INDEX_H
34
struct index_state;
5struct strbuf;
6struct ewah_bitmap;
78
struct split_index {
9unsigned char base_sha1[20];
10struct index_state *base;
11struct ewah_bitmap *delete_bitmap;
12struct ewah_bitmap *replace_bitmap;
13struct cache_entry **saved_cache;
14unsigned int saved_cache_nr;
15unsigned int nr_deletions;
16unsigned int nr_replacements;
17int refcount;
18};
1920
struct split_index *init_split_index(struct index_state *istate);
21void save_or_free_index_entry(struct index_state *istate, struct cache_entry *ce);
22void replace_index_entry_in_base(struct index_state *istate,
23struct cache_entry *old,
24struct cache_entry *new);
25int read_link_extension(struct index_state *istate,
26const void *data, unsigned long sz);
27int write_link_extension(struct strbuf *sb,
28struct index_state *istate);
29void move_cache_to_base_index(struct index_state *istate);
30void merge_base_index(struct index_state *istate);
31void prepare_to_write_split_index(struct index_state *istate);
32void finish_writing_split_index(struct index_state *istate);
33void discard_split_index(struct index_state *istate);
34void add_split_index(struct index_state *istate);
35void remove_split_index(struct index_state *istate);
36void unshare_split_index(struct index_state *istate, int discard);
3738
#endif