]> git.ipfire.org Git - thirdparty/git.git/blame - merge-recursive.h
connect: let callers know if connection is a socket
[thirdparty/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;
9 unsigned subtree_merge : 1;
10 unsigned buffer_output : 1;
11 int verbosity;
12 int diff_rename_limit;
13 int merge_rename_limit;
5033639c 14 int call_depth;
c7d84924 15 struct strbuf obuf;
696ee23c
MV
16 struct string_list current_file_set;
17 struct string_list current_directory_set;
8a2fce18
MV
18};
19
264b774b
MM
20/* Return a list of user-friendly error messages to be used by merge */
21struct unpack_trees_error_msgs get_porcelain_error_msgs(void);
22
8a2fce18
MV
23/* merge_trees() but with recursive ancestor consolidation */
24int merge_recursive(struct merge_options *o,
25 struct commit *h1,
e1b3a2ca 26 struct commit *h2,
e1b3a2ca
DB
27 struct commit_list *ancestors,
28 struct commit **result);
29
8a2fce18
MV
30/* rename-detecting three-way merge, no recursion */
31int merge_trees(struct merge_options *o,
32 struct tree *head,
e1b3a2ca
DB
33 struct tree *merge,
34 struct tree *common,
e1b3a2ca 35 struct tree **result);
e1b3a2ca 36
8a2fce18
MV
37/*
38 * "git-merge-recursive" can be fed trees; wrap them into
39 * virtual commits and call merge_recursive() proper.
40 */
41int merge_recursive_generic(struct merge_options *o,
42 const unsigned char *head,
43 const unsigned char *merge,
44 int num_ca,
45 const unsigned char **ca,
46 struct commit **result);
47
48void init_merge_options(struct merge_options *o);
49struct tree *write_tree_from_memory(struct merge_options *o);
9047ebbc 50
e1b3a2ca 51#endif