Code

4f5537417e3b290544138edaec9c32469c19e477
[git.git] / merge-recursive.h
1 #ifndef MERGE_RECURSIVE_H
2 #define MERGE_RECURSIVE_H
4 struct merge_options {
5         const char *branch1;
6         const char *branch2;
7         unsigned subtree_merge : 1;
8         unsigned buffer_output : 1;
9         int verbosity;
10         int diff_rename_limit;
11         int merge_rename_limit;
12         int call_depth;
13 };
15 /* merge_trees() but with recursive ancestor consolidation */
16 int merge_recursive(struct merge_options *o,
17                     struct commit *h1,
18                     struct commit *h2,
19                     struct commit_list *ancestors,
20                     struct commit **result);
22 /* rename-detecting three-way merge, no recursion */
23 int merge_trees(struct merge_options *o,
24                 struct tree *head,
25                 struct tree *merge,
26                 struct tree *common,
27                 struct tree **result);
29 /*
30  * "git-merge-recursive" can be fed trees; wrap them into
31  * virtual commits and call merge_recursive() proper.
32  */
33 int merge_recursive_generic(struct merge_options *o,
34                             const unsigned char *head,
35                             const unsigned char *merge,
36                             int num_ca,
37                             const unsigned char **ca,
38                             struct commit **result);
40 void init_merge_options(struct merge_options *o);
41 struct tree *write_tree_from_memory(struct merge_options *o);
43 #endif