2007-12-24 09:36:00 +01:00
|
|
|
/*
|
|
|
|
* Low level 3-way in-core file merge.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef LL_MERGE_H
|
|
|
|
#define LL_MERGE_H
|
|
|
|
|
2010-08-05 13:17:38 +02:00
|
|
|
#define LL_OPT_VIRTUAL_ANCESTOR (1 << 0)
|
|
|
|
#define LL_OPT_FAVOR_MASK ((1 << 1) | (1 << 2))
|
|
|
|
#define LL_OPT_FAVOR_SHIFT 1
|
|
|
|
|
|
|
|
static inline int ll_opt_favor(int flag)
|
|
|
|
{
|
|
|
|
return (flag & LL_OPT_FAVOR_MASK) >> LL_OPT_FAVOR_SHIFT;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline int create_ll_flag(int favor)
|
|
|
|
{
|
|
|
|
return ((favor << LL_OPT_FAVOR_SHIFT) & LL_OPT_FAVOR_MASK);
|
|
|
|
}
|
|
|
|
|
2007-12-24 09:36:00 +01:00
|
|
|
int ll_merge(mmbuffer_t *result_buf,
|
|
|
|
const char *path,
|
2010-03-21 01:38:58 +01:00
|
|
|
mmfile_t *ancestor, const char *ancestor_label,
|
2007-12-24 09:36:00 +01:00
|
|
|
mmfile_t *ours, const char *our_label,
|
|
|
|
mmfile_t *theirs, const char *their_label,
|
2009-11-26 03:23:55 +01:00
|
|
|
int flag);
|
2007-12-24 09:36:00 +01:00
|
|
|
|
2010-01-17 08:28:46 +01:00
|
|
|
int ll_merge_marker_size(const char *path);
|
|
|
|
|
2007-12-24 09:36:00 +01:00
|
|
|
#endif
|