4 #include "merge-recursive.h"
11 * Whether the merge is clean; possible values:
13 * 0: not clean (merge conflicts)
14 * <0: operation aborted prematurely. (object database
15 * unreadable, disk full, etc.) Worktree may be left in an
16 * inconsistent state if operation failed near the end.
21 * Result of merge. If !clean, represents what would go in worktree
22 * (thus possibly including files containing conflict markers).
27 * Additional metadata used by merge_switch_to_result() or future calls
28 * to merge_incore_*(). Includes data needed to update the index (if
29 * !clean) and to print "CONFLICT" messages. Not for external use.
35 * rename-detecting three-way merge with recursive ancestor consolidation.
36 * working tree and index are untouched.
38 * merge_bases will be consumed (emptied) so make a copy if you need it.
40 * NOTE: empirically, the recursive algorithm will perform better if you
41 * pass the merge_bases in the order of oldest commit to the
44 * [1] https://lore.kernel.org/git/nycvar.QRO.7.76.6.1907252055500.21907@tvgsbejvaqbjf.bet/
45 * [2] commit 8918b0c9c2 ("merge-recur: try to merge older merge bases
48 void merge_incore_recursive(struct merge_options
*opt
,
49 struct commit_list
*merge_bases
,
52 struct merge_result
*result
);
55 * rename-detecting three-way merge, no recursion.
56 * working tree and index are untouched.
58 void merge_incore_nonrecursive(struct merge_options
*opt
,
59 struct tree
*merge_base
,
62 struct merge_result
*result
);
64 /* Update the working tree and index from head to result after incore merge */
65 void merge_switch_to_result(struct merge_options
*opt
,
67 struct merge_result
*result
,
68 int update_worktree_and_index
,
69 int display_update_msgs
);
71 /* Do needed cleanup when not calling merge_switch_to_result() */
72 void merge_finalize(struct merge_options
*opt
,
73 struct merge_result
*result
);