]> git.ipfire.org Git - thirdparty/git.git/blame - ll-merge.h
send-email: use catfile() to concatenate files
[thirdparty/git.git] / ll-merge.h
CommitLineData
525ab639
JH
1/*
2 * Low level 3-way in-core file merge.
3 */
4
5#ifndef LL_MERGE_H
6#define LL_MERGE_H
7
73cf7f71
JN
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
18b037a5 11#define LL_OPT_RENORMALIZE (1 << 3)
73cf7f71
JN
12
13static inline int ll_opt_favor(int flag)
14{
15 return (flag & LL_OPT_FAVOR_MASK) >> LL_OPT_FAVOR_SHIFT;
16}
17
18static inline int create_ll_flag(int favor)
19{
20 return ((favor << LL_OPT_FAVOR_SHIFT) & LL_OPT_FAVOR_MASK);
21}
22
525ab639
JH
23int ll_merge(mmbuffer_t *result_buf,
24 const char *path,
f01de62e 25 mmfile_t *ancestor, const char *ancestor_label,
525ab639
JH
26 mmfile_t *ours, const char *our_label,
27 mmfile_t *theirs, const char *their_label,
8cc5b290 28 int flag);
525ab639 29
8588567c
JH
30int ll_merge_marker_size(const char *path);
31
525ab639 32#endif