]>
Commit | Line | Data |
---|---|---|
16da134b JS |
1 | #ifndef UNPACK_TREES_H |
2 | #define UNPACK_TREES_H | |
3 | ||
ca885a4f JH |
4 | #define MAX_UNPACK_TREES 8 |
5 | ||
16da134b JS |
6 | struct unpack_trees_options; |
7 | ||
8 | typedef int (*merge_fn_t)(struct cache_entry **src, | |
34110cd4 | 9 | struct unpack_trees_options *options); |
16da134b | 10 | |
8ccba008 JH |
11 | struct unpack_trees_error_msgs { |
12 | const char *would_overwrite; | |
13 | const char *not_uptodate_file; | |
14 | const char *not_uptodate_dir; | |
15 | const char *would_lose_untracked; | |
16 | const char *bind_overlap; | |
17 | }; | |
18 | ||
16da134b | 19 | struct unpack_trees_options { |
5a56da58 SB |
20 | unsigned int reset, |
21 | merge, | |
22 | update, | |
23 | index_only, | |
24 | nontrivial_merge, | |
25 | trivial_merges_only, | |
26 | verbose_update, | |
27 | aggressive, | |
28 | skip_unmerged, | |
29 | initial_checkout, | |
30 | diff_index_cached, | |
31 | gently; | |
16da134b | 32 | const char *prefix; |
9a4d8fdc | 33 | int pos; |
f8a9d428 | 34 | struct dir_struct *dir; |
16da134b | 35 | merge_fn_t fn; |
8ccba008 | 36 | struct unpack_trees_error_msgs msgs; |
16da134b JS |
37 | |
38 | int head_idx; | |
39 | int merge_size; | |
40 | ||
41 | struct cache_entry *df_conflict_entry; | |
d1f2d7e8 | 42 | void *unpack_data; |
34110cd4 LT |
43 | |
44 | struct index_state *dst_index; | |
32260ad5 | 45 | struct index_state *src_index; |
34110cd4 | 46 | struct index_state result; |
16da134b JS |
47 | }; |
48 | ||
933bf40a | 49 | extern int unpack_trees(unsigned n, struct tree_desc *t, |
16da134b JS |
50 | struct unpack_trees_options *options); |
51 | ||
34110cd4 LT |
52 | int threeway_merge(struct cache_entry **stages, struct unpack_trees_options *o); |
53 | int twoway_merge(struct cache_entry **src, struct unpack_trees_options *o); | |
54 | int bind_merge(struct cache_entry **src, struct unpack_trees_options *o); | |
55 | int oneway_merge(struct cache_entry **src, struct unpack_trees_options *o); | |
076b0adc | 56 | |
16da134b | 57 | #endif |