2007-12-24 11:36:00 +03:00
|
|
|
/*
|
|
|
|
* Low level 3-way in-core file merge.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef LL_MERGE_H
|
|
|
|
#define LL_MERGE_H
|
|
|
|
|
2018-08-15 20:54:05 +03:00
|
|
|
#include "xdiff/xdiff.h"
|
|
|
|
|
2018-09-21 18:57:27 +03:00
|
|
|
struct index_state;
|
|
|
|
|
2010-08-26 09:49:53 +04:00
|
|
|
struct ll_merge_options {
|
|
|
|
unsigned virtual_ancestor : 1;
|
|
|
|
unsigned variant : 2; /* favor ours, favor theirs, or union merge */
|
|
|
|
unsigned renormalize : 1;
|
2018-11-08 07:40:24 +03:00
|
|
|
unsigned extra_marker_size;
|
2010-08-26 09:50:45 +04:00
|
|
|
long xdl_opts;
|
2010-08-26 09:49:53 +04:00
|
|
|
};
|
2010-08-05 15:17:38 +04:00
|
|
|
|
2007-12-24 11:36:00 +03:00
|
|
|
int ll_merge(mmbuffer_t *result_buf,
|
|
|
|
const char *path,
|
2010-03-21 03:38:58 +03:00
|
|
|
mmfile_t *ancestor, const char *ancestor_label,
|
2007-12-24 11:36:00 +03:00
|
|
|
mmfile_t *ours, const char *our_label,
|
|
|
|
mmfile_t *theirs, const char *their_label,
|
2018-09-21 18:57:27 +03:00
|
|
|
struct index_state *istate,
|
2010-08-26 09:49:53 +04:00
|
|
|
const struct ll_merge_options *opts);
|
2007-12-24 11:36:00 +03:00
|
|
|
|
2018-09-21 18:57:27 +03:00
|
|
|
int ll_merge_marker_size(struct index_state *istate, const char *path);
|
2010-01-17 10:28:46 +03:00
|
|
|
|
2007-12-24 11:36:00 +03:00
|
|
|
#endif
|