]>
Commit | Line | Data |
---|---|---|
17e5574b EN |
1 | #ifndef MERGE_ORT_H |
2 | #define MERGE_ORT_H | |
3 | ||
4 | #include "merge-recursive.h" | |
5 | ||
6 | struct commit; | |
7 | struct tree; | |
8 | ||
9 | struct merge_result { | |
10 | /* Whether the merge is clean */ | |
11 | int clean; | |
12 | ||
13 | /* | |
14 | * Result of merge. If !clean, represents what would go in worktree | |
15 | * (thus possibly including files containing conflict markers). | |
16 | */ | |
17 | struct tree *tree; | |
18 | ||
19 | /* | |
20 | * Additional metadata used by merge_switch_to_result() or future calls | |
21 | * to merge_incore_*(). Includes data needed to update the index (if | |
22 | * !clean) and to print "CONFLICT" messages. Not for external use. | |
23 | */ | |
24 | void *priv; | |
25 | }; | |
26 | ||
27 | /* | |
28 | * rename-detecting three-way merge with recursive ancestor consolidation. | |
29 | * working tree and index are untouched. | |
30 | */ | |
31 | void merge_incore_recursive(struct merge_options *opt, | |
32 | struct commit_list *merge_bases, | |
33 | struct commit *side1, | |
34 | struct commit *side2, | |
35 | struct merge_result *result); | |
36 | ||
37 | /* | |
38 | * rename-detecting three-way merge, no recursion. | |
39 | * working tree and index are untouched. | |
40 | */ | |
41 | void merge_incore_nonrecursive(struct merge_options *opt, | |
42 | struct tree *merge_base, | |
43 | struct tree *side1, | |
44 | struct tree *side2, | |
45 | struct merge_result *result); | |
46 | ||
47 | /* Update the working tree and index from head to result after incore merge */ | |
48 | void merge_switch_to_result(struct merge_options *opt, | |
49 | struct tree *head, | |
50 | struct merge_result *result, | |
51 | int update_worktree_and_index, | |
52 | int display_update_msgs); | |
53 | ||
54 | /* Do needed cleanup when not calling merge_switch_to_result() */ | |
55 | void merge_finalize(struct merge_options *opt, | |
56 | struct merge_result *result); | |
57 | ||
58 | #endif |