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_OVERWRITTEN
,
17 ERROR_WOULD_LOSE_UNTRACKED_REMOVED
,
19 ERROR_SPARSE_NOT_UPTODATE_FILE
,
20 ERROR_WOULD_LOSE_ORPHANED_OVERWRITTEN
,
21 ERROR_WOULD_LOSE_ORPHANED_REMOVED
,
22 NB_UNPACK_TREES_ERROR_TYPES
26 * Sets the list of user-friendly error messages to be used by the
27 * command "cmd" (either merge or checkout), and show_all_errors to 1.
29 void setup_unpack_trees_porcelain(struct unpack_trees_options
*opts
,
32 struct rejected_paths_list
{
34 struct rejected_paths_list
*next
;
37 struct unpack_trees_options
{
55 struct dir_struct
*dir
;
57 const char *msgs
[NB_UNPACK_TREES_ERROR_TYPES
];
59 * Store error messages in an array, each case
60 * corresponding to a error message type
62 struct rejected_paths_list
*unpack_rejects
[NB_UNPACK_TREES_ERROR_TYPES
];
67 struct cache_entry
*df_conflict_entry
;
70 struct index_state
*dst_index
;
71 struct index_state
*src_index
;
72 struct index_state result
;
74 struct exclude_list
*el
; /* for internal use */
77 extern int unpack_trees(unsigned n
, struct tree_desc
*t
,
78 struct unpack_trees_options
*options
);
80 int threeway_merge(struct cache_entry
**stages
, struct unpack_trees_options
*o
);
81 int twoway_merge(struct cache_entry
**src
, struct unpack_trees_options
*o
);
82 int bind_merge(struct cache_entry
**src
, struct unpack_trees_options
*o
);
83 int oneway_merge(struct cache_entry
**src
, struct unpack_trees_options
*o
);