4 #define MAX_UNPACK_TREES 8
6 struct unpack_trees_options
;
9 typedef int (*merge_fn_t
)(struct cache_entry
**src
,
10 struct unpack_trees_options
*options
);
12 enum unpack_trees_error_types
{
13 ERROR_WOULD_OVERWRITE
= 0,
14 ERROR_NOT_UPTODATE_FILE
,
15 ERROR_NOT_UPTODATE_DIR
,
16 ERROR_WOULD_LOSE_UNTRACKED
,
18 ERROR_SPARSE_NOT_UPTODATE_FILE
,
19 ERROR_WOULD_LOSE_ORPHANED
,
20 NB_UNPACK_TREES_ERROR_TYPES
23 struct unpack_trees_options
{
40 struct dir_struct
*dir
;
42 const char *msgs
[NB_UNPACK_TREES_ERROR_TYPES
];
47 struct cache_entry
*df_conflict_entry
;
50 struct index_state
*dst_index
;
51 struct index_state
*src_index
;
52 struct index_state result
;
54 struct exclude_list
*el
; /* for internal use */
57 extern int unpack_trees(unsigned n
, struct tree_desc
*t
,
58 struct unpack_trees_options
*options
);
60 int threeway_merge(struct cache_entry
**stages
, struct unpack_trees_options
*o
);
61 int twoway_merge(struct cache_entry
**src
, struct unpack_trees_options
*o
);
62 int bind_merge(struct cache_entry
**src
, struct unpack_trees_options
*o
);
63 int oneway_merge(struct cache_entry
**src
, struct unpack_trees_options
*o
);