blob: 5517faafad6ca3f327c81ab6e8e5f2701ff0ad14 [file] [log] [blame]
Johannes Schindelin16da1342006-07-30 20:25:18 +02001#ifndef UNPACK_TREES_H
2#define UNPACK_TREES_H
3
4struct unpack_trees_options;
5
6typedef int (*merge_fn_t)(struct cache_entry **src,
Linus Torvaldsb48d5a02007-08-10 12:15:54 -07007 struct unpack_trees_options *options,
8 int remove);
Johannes Schindelin16da1342006-07-30 20:25:18 +02009
10struct unpack_trees_options {
11 int reset;
12 int merge;
13 int update;
14 int index_only;
15 int nontrivial_merge;
16 int trivial_merges_only;
17 int verbose_update;
18 int aggressive;
19 const char *prefix;
Junio C Hamano9a4d8fd2007-04-02 15:06:59 -070020 int pos;
Junio C Hamanof8a9d422006-12-04 16:00:46 -080021 struct dir_struct *dir;
Johannes Schindelin16da1342006-07-30 20:25:18 +020022 merge_fn_t fn;
23
24 int head_idx;
25 int merge_size;
26
27 struct cache_entry *df_conflict_entry;
28};
29
Linus Torvalds933bf402007-08-09 22:21:29 -070030extern int unpack_trees(unsigned n, struct tree_desc *t,
Johannes Schindelin16da1342006-07-30 20:25:18 +020031 struct unpack_trees_options *options);
32
Linus Torvaldsb48d5a02007-08-10 12:15:54 -070033int threeway_merge(struct cache_entry **stages, struct unpack_trees_options *o, int);
34int twoway_merge(struct cache_entry **src, struct unpack_trees_options *o, int);
35int bind_merge(struct cache_entry **src, struct unpack_trees_options *o, int);
36int oneway_merge(struct cache_entry **src, struct unpack_trees_options *o, int);
Johannes Schindelin076b0ad2006-07-30 20:26:15 +020037
Johannes Schindelin16da1342006-07-30 20:25:18 +020038#endif