Johannes Schindelin | 16da134 | 2006-07-30 20:25:18 +0200 | [diff] [blame] | 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, |
Linus Torvalds | b48d5a0 | 2007-08-10 12:15:54 -0700 | [diff] [blame] | 7 | struct unpack_trees_options *options, |
| 8 | int remove); |
Johannes Schindelin | 16da134 | 2006-07-30 20:25:18 +0200 | [diff] [blame] | 9 | |
| 10 | struct 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 Hamano | 9a4d8fd | 2007-04-02 15:06:59 -0700 | [diff] [blame] | 20 | int pos; |
Junio C Hamano | f8a9d42 | 2006-12-04 16:00:46 -0800 | [diff] [blame] | 21 | struct dir_struct *dir; |
Johannes Schindelin | 16da134 | 2006-07-30 20:25:18 +0200 | [diff] [blame] | 22 | merge_fn_t fn; |
| 23 | |
| 24 | int head_idx; |
| 25 | int merge_size; |
| 26 | |
| 27 | struct cache_entry *df_conflict_entry; |
| 28 | }; |
| 29 | |
Linus Torvalds | 933bf40 | 2007-08-09 22:21:29 -0700 | [diff] [blame] | 30 | extern int unpack_trees(unsigned n, struct tree_desc *t, |
Johannes Schindelin | 16da134 | 2006-07-30 20:25:18 +0200 | [diff] [blame] | 31 | struct unpack_trees_options *options); |
| 32 | |
Linus Torvalds | b48d5a0 | 2007-08-10 12:15:54 -0700 | [diff] [blame] | 33 | int threeway_merge(struct cache_entry **stages, struct unpack_trees_options *o, int); |
| 34 | int twoway_merge(struct cache_entry **src, struct unpack_trees_options *o, int); |
| 35 | int bind_merge(struct cache_entry **src, struct unpack_trees_options *o, int); |
| 36 | int oneway_merge(struct cache_entry **src, struct unpack_trees_options *o, int); |
Johannes Schindelin | 076b0ad | 2006-07-30 20:26:15 +0200 | [diff] [blame] | 37 | |
Johannes Schindelin | 16da134 | 2006-07-30 20:25:18 +0200 | [diff] [blame] | 38 | #endif |