Make 'unpack_trees()' have a separate source and destination index
[git/git.git] / unpack-trees.h
CommitLineData
16da134b
JS
1#ifndef UNPACK_TREES_H
2#define UNPACK_TREES_H
3
4struct unpack_trees_options;
5
6typedef int (*merge_fn_t)(struct cache_entry **src,
34110cd4 7 struct unpack_trees_options *options);
16da134b
JS
8
9struct 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;
4e7c4571 18 int skip_unmerged;
17e46426 19 int gently;
16da134b 20 const char *prefix;
9a4d8fdc 21 int pos;
f8a9d428 22 struct dir_struct *dir;
16da134b
JS
23 merge_fn_t fn;
24
25 int head_idx;
26 int merge_size;
27
28 struct cache_entry *df_conflict_entry;
d1f2d7e8 29 void *unpack_data;
34110cd4
LT
30
31 struct index_state *dst_index;
32 const struct index_state *src_index;
33 struct index_state result;
16da134b
JS
34};
35
933bf40a 36extern int unpack_trees(unsigned n, struct tree_desc *t,
16da134b
JS
37 struct unpack_trees_options *options);
38
34110cd4
LT
39int threeway_merge(struct cache_entry **stages, struct unpack_trees_options *o);
40int twoway_merge(struct cache_entry **src, struct unpack_trees_options *o);
41int bind_merge(struct cache_entry **src, struct unpack_trees_options *o);
42int oneway_merge(struct cache_entry **src, struct unpack_trees_options *o);
076b0adc 43
16da134b 44#endif