]> Pileus Git - ~andy/git/blob - unpack-trees.h
Merge branch 'lt/unpack-trees'
[~andy/git] / unpack-trees.h
1 #ifndef UNPACK_TREES_H
2 #define UNPACK_TREES_H
3
4 struct unpack_trees_options;
5
6 typedef int (*merge_fn_t)(struct cache_entry **src,
7                 struct unpack_trees_options *options);
8
9 struct unpack_trees_options {
10         int reset;
11         int merge;
12         int update;
13         int index_only;
14         int nontrivial_merge;
15         int trivial_merges_only;
16         int verbose_update;
17         int aggressive;
18         int skip_unmerged;
19         int gently;
20         const char *prefix;
21         int pos;
22         struct dir_struct *dir;
23         merge_fn_t fn;
24
25         int head_idx;
26         int merge_size;
27
28         struct cache_entry *df_conflict_entry;
29         void *unpack_data;
30
31         struct index_state *dst_index;
32         const struct index_state *src_index;
33         struct index_state result;
34 };
35
36 extern int unpack_trees(unsigned n, struct tree_desc *t,
37                 struct unpack_trees_options *options);
38
39 int threeway_merge(struct cache_entry **stages, struct unpack_trees_options *o);
40 int twoway_merge(struct cache_entry **src, struct unpack_trees_options *o);
41 int bind_merge(struct cache_entry **src, struct unpack_trees_options *o);
42 int oneway_merge(struct cache_entry **src, struct unpack_trees_options *o);
43
44 #endif