]> git.ipfire.org Git - thirdparty/git.git/blame - unpack-trees.h
commit-tree: lift completely arbitrary limit of 16 parents
[thirdparty/git.git] / unpack-trees.h
CommitLineData
16da134b
JS
1#ifndef UNPACK_TREES_H
2#define UNPACK_TREES_H
3
ca885a4f
JH
4#define MAX_UNPACK_TREES 8
5
16da134b
JS
6struct unpack_trees_options;
7
8typedef int (*merge_fn_t)(struct cache_entry **src,
34110cd4 9 struct unpack_trees_options *options);
16da134b 10
8ccba008
JH
11struct 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 19struct unpack_trees_options {
75dc6c7c
LT
20 unsigned int reset:1,
21 merge:1,
22 update:1,
23 index_only:1,
24 nontrivial_merge:1,
25 trivial_merges_only:1,
26 verbose_update:1,
27 aggressive:1,
28 skip_unmerged:1,
29 gently:1;
16da134b 30 const char *prefix;
9a4d8fdc 31 int pos;
f8a9d428 32 struct dir_struct *dir;
16da134b 33 merge_fn_t fn;
8ccba008 34 struct unpack_trees_error_msgs msgs;
16da134b
JS
35
36 int head_idx;
37 int merge_size;
38
39 struct cache_entry *df_conflict_entry;
d1f2d7e8 40 void *unpack_data;
34110cd4
LT
41
42 struct index_state *dst_index;
32260ad5 43 struct index_state *src_index;
34110cd4 44 struct index_state result;
16da134b
JS
45};
46
933bf40a 47extern int unpack_trees(unsigned n, struct tree_desc *t,
16da134b
JS
48 struct unpack_trees_options *options);
49
34110cd4
LT
50int threeway_merge(struct cache_entry **stages, struct unpack_trees_options *o);
51int twoway_merge(struct cache_entry **src, struct unpack_trees_options *o);
52int bind_merge(struct cache_entry **src, struct unpack_trees_options *o);
53int oneway_merge(struct cache_entry **src, struct unpack_trees_options *o);
076b0adc 54
16da134b 55#endif