pull: Fix parsing of -X<option>
[git/git.git] / merge-recursive.h
CommitLineData
e1b3a2ca
DB
1#ifndef MERGE_RECURSIVE_H
2#define MERGE_RECURSIVE_H
3
696ee23c
MV
4#include "string-list.h"
5
8a2fce18
MV
6struct merge_options {
7 const char *branch1;
8 const char *branch2;
8cc5b290
AP
9 enum {
10 MERGE_RECURSIVE_SUBTREE = 1,
11 MERGE_RECURSIVE_OURS,
12 MERGE_RECURSIVE_THEIRS,
13 } recursive_variant;
8a2fce18
MV
14 unsigned buffer_output : 1;
15 int verbosity;
16 int diff_rename_limit;
17 int merge_rename_limit;
5033639c 18 int call_depth;
c7d84924 19 struct strbuf obuf;
696ee23c
MV
20 struct string_list current_file_set;
21 struct string_list current_directory_set;
8a2fce18
MV
22};
23
24/* merge_trees() but with recursive ancestor consolidation */
25int merge_recursive(struct merge_options *o,
26 struct commit *h1,
e1b3a2ca 27 struct commit *h2,
e1b3a2ca
DB
28 struct commit_list *ancestors,
29 struct commit **result);
30
8a2fce18
MV
31/* rename-detecting three-way merge, no recursion */
32int merge_trees(struct merge_options *o,
33 struct tree *head,
e1b3a2ca
DB
34 struct tree *merge,
35 struct tree *common,
e1b3a2ca 36 struct tree **result);
e1b3a2ca 37
8a2fce18
MV
38/*
39 * "git-merge-recursive" can be fed trees; wrap them into
40 * virtual commits and call merge_recursive() proper.
41 */
42int merge_recursive_generic(struct merge_options *o,
43 const unsigned char *head,
44 const unsigned char *merge,
45 int num_ca,
46 const unsigned char **ca,
47 struct commit **result);
48
49void init_merge_options(struct merge_options *o);
50struct tree *write_tree_from_memory(struct merge_options *o);
9047ebbc 51
e1b3a2ca 52#endif