blob: 244a31f55ac7375b59d7c257bfc2391957fdca94 [file] [log] [blame]
Junio C Hamano525ab632007-12-24 00:36:00 -08001/*
2 * Low level 3-way in-core file merge.
3 */
4
5#ifndef LL_MERGE_H
6#define LL_MERGE_H
7
Jonathan Nieder712516b2010-08-26 00:49:53 -05008struct ll_merge_options {
9 unsigned virtual_ancestor : 1;
10 unsigned variant : 2; /* favor ours, favor theirs, or union merge */
11 unsigned renormalize : 1;
Justin Frankel58a1ece2010-08-26 00:50:45 -050012 long xdl_opts;
Jonathan Nieder712516b2010-08-26 00:49:53 -050013};
Jonathan Nieder73cf7f72010-08-05 06:17:38 -050014
Junio C Hamano525ab632007-12-24 00:36:00 -080015int ll_merge(mmbuffer_t *result_buf,
16 const char *path,
Jonathan Niederf01de622010-03-20 19:38:58 -050017 mmfile_t *ancestor, const char *ancestor_label,
Junio C Hamano525ab632007-12-24 00:36:00 -080018 mmfile_t *ours, const char *our_label,
19 mmfile_t *theirs, const char *their_label,
Jonathan Nieder712516b2010-08-26 00:49:53 -050020 const struct ll_merge_options *opts);
Junio C Hamano525ab632007-12-24 00:36:00 -080021
Junio C Hamano85885672010-01-16 23:28:46 -080022int ll_merge_marker_size(const char *path);
23
Junio C Hamano525ab632007-12-24 00:36:00 -080024#endif