merge-recursive: get rid of the index_only global variable
[git/git.git] / merge-recursive.h
CommitLineData
e1b3a2ca
DB
1#ifndef MERGE_RECURSIVE_H
2#define MERGE_RECURSIVE_H
3
8a2fce18
MV
4struct 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;
5033639c 12 int call_depth;
8a2fce18
MV
13};
14
15/* merge_trees() but with recursive ancestor consolidation */
16int merge_recursive(struct merge_options *o,
17 struct commit *h1,
e1b3a2ca 18 struct commit *h2,
e1b3a2ca
DB
19 struct commit_list *ancestors,
20 struct commit **result);
21
8a2fce18
MV
22/* rename-detecting three-way merge, no recursion */
23int merge_trees(struct merge_options *o,
24 struct tree *head,
e1b3a2ca
DB
25 struct tree *merge,
26 struct tree *common,
e1b3a2ca 27 struct tree **result);
e1b3a2ca 28
8a2fce18
MV
29/*
30 * "git-merge-recursive" can be fed trees; wrap them into
31 * virtual commits and call merge_recursive() proper.
32 */
33int 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);
39
40void init_merge_options(struct merge_options *o);
41struct tree *write_tree_from_memory(struct merge_options *o);
9047ebbc 42
e1b3a2ca 43#endif