mirror of
https://github.com/git/git.git
synced 2024-11-27 03:53:55 +08:00
47b1e890e3
There are a few differences between the new API in merge-ort and the old API in merge-recursive. While the new API is more flexible, it might feel like more work at times than the old API. merge-ort-wrappers creates two convenience wrappers taking the exact same arguments as the old merge_trees() and merge_recursive() functions and implements them via the new API. This makes converting existing callsites easier, and serves to highlight some of the differences in the API. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
26 lines
638 B
C
26 lines
638 B
C
#ifndef MERGE_ORT_WRAPPERS_H
|
|
#define MERGE_ORT_WRAPPERS_H
|
|
|
|
#include "merge-recursive.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,
|
|
struct commit_list *ancestors,
|
|
struct commit **result);
|
|
|
|
#endif
|