split-index: the writing part
[git/git.git] / split-index.h
CommitLineData
5fc2fc8f
NTND
1#ifndef SPLIT_INDEX_H
2#define SPLIT_INDEX_H
3
4struct index_state;
5struct strbuf;
96a1d8d3 6struct ewah_bitmap;
5fc2fc8f
NTND
7
8struct split_index {
9 unsigned char base_sha1[20];
10 struct index_state *base;
96a1d8d3
NTND
11 struct ewah_bitmap *delete_bitmap;
12 struct ewah_bitmap *replace_bitmap;
13 struct cache_entry **saved_cache;
5fc2fc8f
NTND
14 unsigned int saved_cache_nr;
15 int refcount;
16};
17
18struct split_index *init_split_index(struct index_state *istate);
045113a5 19void save_or_free_index_entry(struct index_state *istate, struct cache_entry *ce);
078a58e8
NTND
20void replace_index_entry_in_base(struct index_state *istate,
21 struct cache_entry *old,
22 struct cache_entry *new);
5fc2fc8f
NTND
23int read_link_extension(struct index_state *istate,
24 const void *data, unsigned long sz);
25int write_link_extension(struct strbuf *sb,
26 struct index_state *istate);
27void move_cache_to_base_index(struct index_state *istate);
28void merge_base_index(struct index_state *istate);
29void prepare_to_write_split_index(struct index_state *istate);
30void finish_writing_split_index(struct index_state *istate);
31void discard_split_index(struct index_state *istate);
32
33#endif