On Sat, Oct 24, 2020 at 3:57 AM Peter Baumann <peter.baumann@xxxxxxxxx> wrote: > > Am Sa., 24. Okt. 2020 um 11:58 Uhr schrieb Peter Baumann <peter.baumann@xxxxxxxxx>: >>> >>> Am Do., 22. Okt. 2020 um 03:28 Uhr schrieb Elijah Newren via GitGitGadget <gitgitgadget@xxxxxxxxx>: >>> [... ] >>>> >>>> diff --git a/merge-ort.h b/merge-ort.h >>>> new file mode 100644 >>>> index 0000000000..9c655cd3ad >>>> --- /dev/null >>>> +++ b/merge-ort.h >>>> @@ -0,0 +1,49 @@ >>>> +#ifndef MERGE_ORT_H >>>> +#define MERGE_ORT_H >>>> + >>>> +#include "merge-recursive.h" >>>> + >>>> +struct commit; >>>> +struct tree; >>>> + >>>> +struct merge_result { >>>> + /* whether the merge is clean */ >>>> + int clean; >>>> + >>>> + /* Result of merge. If !clean, represents what would go in worktree */ >>>> + struct tree *tree; >>>> + >>>> + /* >>>> + * Additional metadata used by merge_switch_to_result() or future calls >>>> + * to merge_inmemory_*(). >>>> + */ >>>> + unsigned _; >>>> + void *priv; >>>> +}; >>>> + >>>> +/* rename-detecting three-way merge, no recursion. */ >>> >>> ^^^^^^^^^^^^ >>>> >>>> +void merge_inmemory_recursive(struct merge_options *opt, >>> >>> ^^^^^^^^ >>>> >>>> + struct commit_list *merge_bases, >>>> + struct commit *side1, >>>> + struct commit *side2, >>>> + struct merge_result *result); >>>> + >>>> +/* rename-detecting three-way merge with recursive ancestor consolidation. */ >>> >>> ^^^^^^^^^^^^^^^^^^^^^^ >>>> >>>> +void merge_inmemory_nonrecursive(struct merge_options *opt, >>> >>> ^^^^^^^^^^^^^ >>>> >>>> + struct tree *merge_base, >>>> + struct tree *side1, >>>> + struct tree *side2, >>>> + struct merge_result *result); >>>> + >>>> [...] >>> >>> >>> Looks like the comments above don't match the method names they are describing. >>> I assume they should be just switched? Whoops, indeed. Will fix; thanks for spotting. >>> >>> -Peter >>> > Sorry, I completely messed up the markers. Serves me well for not using a fixed with font. > Here it is again, highlighting only the relevant section: > > > +/* rename-detecting three-way merge, no recursion. */ > ^^^^^^^^^^^^^ > > +void merge_inmemory_recursive(struct merge_options *opt, > ^^^^^^^^^ > > [...] > > +/* rename-detecting three-way merge with recursive ancestor consolidation. */ > ^^^^^^^^^^^^^^^^^^^^^^ > > +void merge_inmemory_nonrecursive(struct merge_options *opt, > ^^^^^^^^^^^^ > >