mirror of
https://github.com/git/git.git
synced 2025-12-05 18:47:16 -06:00
As a wise man once told me, "Deleted code is debugged code!" So, move the functions that are shared between merge-recursive and merge-ort from the former to the latter, and then debug the remainder of merge-recursive.[ch]. Joking aside, merge-ort was always intended to replace merge-recursive. It has numerous advantages over merge-recursive (operates much faster, can operate without a worktree or index, and fixes a number of known bugs and suboptimal merges). Since we have now replaced all callers of merge-recursive with equivalent functions from merge-ort, move the shared functions from the former to the latter, and delete the remainder of merge-recursive.[ch]. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
38 lines
1.1 KiB
C
38 lines
1.1 KiB
C
#ifndef MERGE_ORT_WRAPPERS_H
|
|
#define MERGE_ORT_WRAPPERS_H
|
|
|
|
#include "merge-ort.h"
|
|
|
|
/*
|
|
* rename-detecting three-way merge, no recursion.
|
|
* Wrapper mimicking the old merge_trees() function.
|
|
*/
|
|
int merge_ort_nonrecursive(struct merge_options *opt,
|
|
struct tree *head,
|
|
struct tree *merge,
|
|
struct tree *common);
|
|
|
|
/*
|
|
* rename-detecting three-way merge with recursive ancestor consolidation.
|
|
* Wrapper mimicking the old merge_recursive() function.
|
|
*/
|
|
int merge_ort_recursive(struct merge_options *opt,
|
|
struct commit *h1,
|
|
struct commit *h2,
|
|
const struct commit_list *ancestors,
|
|
struct commit **result);
|
|
|
|
/*
|
|
* rename-detecting three-way merge. num_merge_bases must be at least 1.
|
|
* Recursive ancestor consolidation will be performed if num_merge_bases > 1.
|
|
* Wrapper mimicking the old merge_recursive_generic() function.
|
|
*/
|
|
int merge_ort_generic(struct merge_options *opt,
|
|
const struct object_id *head,
|
|
const struct object_id *merge,
|
|
int num_merge_bases,
|
|
const struct object_id *merge_bases,
|
|
struct commit **result);
|
|
|
|
#endif
|