about summary refs log tree commit diff
path: root/ll-merge.h
diff options
context:
space:
mode:
authorVincent Ambo <Vincent Ambo>2020-01-11T23·36+0000
committerVincent Ambo <Vincent Ambo>2020-01-11T23·36+0000
commit1b593e1ea4d2af0f6444d9a7788d5d99abd6fde5 (patch)
treee3accb9beed5c4c1b5a05c99db71ab2841f0ed04 /ll-merge.h
Squashed 'third_party/git/' content from commit cb71568594
git-subtree-dir: third_party/git
git-subtree-split: cb715685942260375e1eb8153b0768a376e4ece7
Diffstat (limited to 'll-merge.h')
-rw-r--r--ll-merge.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/ll-merge.h b/ll-merge.h
new file mode 100644
index 000000000000..b9e2af1c8840
--- /dev/null
+++ b/ll-merge.h
@@ -0,0 +1,30 @@
+/*
+ * Low level 3-way in-core file merge.
+ */
+
+#ifndef LL_MERGE_H
+#define LL_MERGE_H
+
+#include "xdiff/xdiff.h"
+
+struct index_state;
+
+struct ll_merge_options {
+	unsigned virtual_ancestor : 1;
+	unsigned variant : 2;	/* favor ours, favor theirs, or union merge */
+	unsigned renormalize : 1;
+	unsigned extra_marker_size;
+	long xdl_opts;
+};
+
+int ll_merge(mmbuffer_t *result_buf,
+	     const char *path,
+	     mmfile_t *ancestor, const char *ancestor_label,
+	     mmfile_t *ours, const char *our_label,
+	     mmfile_t *theirs, const char *their_label,
+	     struct index_state *istate,
+	     const struct ll_merge_options *opts);
+
+int ll_merge_marker_size(struct index_state *istate, const char *path);
+
+#endif