Merge branch 'mg/reset-doc' into maint
[git/mingw/j6t.git] / ll-merge.h
blobff7ca87bfa01d0e9705f4bfd83b9e4d2c155d588
1 /*
2 * Low level 3-way in-core file merge.
3 */
5 #ifndef LL_MERGE_H
6 #define LL_MERGE_H
8 #define LL_OPT_VIRTUAL_ANCESTOR (1 << 0)
9 #define LL_OPT_FAVOR_MASK ((1 << 1) | (1 << 2))
10 #define LL_OPT_FAVOR_SHIFT 1
11 #define LL_OPT_RENORMALIZE (1 << 3)
13 static inline int ll_opt_favor(int flag)
15 return (flag & LL_OPT_FAVOR_MASK) >> LL_OPT_FAVOR_SHIFT;
18 static inline int create_ll_flag(int favor)
20 return ((favor << LL_OPT_FAVOR_SHIFT) & LL_OPT_FAVOR_MASK);
23 int ll_merge(mmbuffer_t *result_buf,
24 const char *path,
25 mmfile_t *ancestor, const char *ancestor_label,
26 mmfile_t *ours, const char *our_label,
27 mmfile_t *theirs, const char *their_label,
28 int flag);
30 int ll_merge_marker_size(const char *path);
32 #endif