Document that merge strategies can now take their own options
[git/git-svn.git] / merge-recursive.h
blobe63df9d63b23f2c5458620007ed6e770aa2b1047
1 #ifndef MERGE_RECURSIVE_H
2 #define MERGE_RECURSIVE_H
4 #include "string-list.h"
6 struct merge_options {
7 const char *branch1;
8 const char *branch2;
9 enum {
10 MERGE_RECURSIVE_NORMAL = 0,
11 MERGE_RECURSIVE_OURS,
12 MERGE_RECURSIVE_THEIRS,
13 } recursive_variant;
14 const char *subtree_shift;
15 unsigned buffer_output : 1;
16 int verbosity;
17 int diff_rename_limit;
18 int merge_rename_limit;
19 int call_depth;
20 struct strbuf obuf;
21 struct string_list current_file_set;
22 struct string_list current_directory_set;
25 /* merge_trees() but with recursive ancestor consolidation */
26 int merge_recursive(struct merge_options *o,
27 struct commit *h1,
28 struct commit *h2,
29 struct commit_list *ancestors,
30 struct commit **result);
32 /* rename-detecting three-way merge, no recursion */
33 int merge_trees(struct merge_options *o,
34 struct tree *head,
35 struct tree *merge,
36 struct tree *common,
37 struct tree **result);
40 * "git-merge-recursive" can be fed trees; wrap them into
41 * virtual commits and call merge_recursive() proper.
43 int merge_recursive_generic(struct merge_options *o,
44 const unsigned char *head,
45 const unsigned char *merge,
46 int num_ca,
47 const unsigned char **ca,
48 struct commit **result);
50 void init_merge_options(struct merge_options *o);
51 struct tree *write_tree_from_memory(struct merge_options *o);
53 #endif