summaryrefslogtreecommitdiff
path: root/src/diff.h
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@microsoft.com>2015-06-23 10:29:59 -0400
committerEdward Thomson <ethomson@microsoft.com>2015-06-23 16:48:50 -0400
commit5ef43d41b036d4178c6d886c2222db9dd7f32fc1 (patch)
treecc96bb84e018d0cc61dd3f5df5d33677d66b9cbf /src/diff.h
parent83ba5e3654631eb186c8b820def459b0680509df (diff)
downloadlibgit2-5ef43d41b036d4178c6d886c2222db9dd7f32fc1.tar.gz
git_diff__merge: allow pluggable diff merges
Diffstat (limited to 'src/diff.h')
-rw-r--r--src/diff.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/diff.h b/src/diff.h
index 2a35fd9ac..39d15fa6d 100644
--- a/src/diff.h
+++ b/src/diff.h
@@ -123,6 +123,16 @@ extern int git_diff_find_similar__calc_similarity(
extern int git_diff__commit(
git_diff **diff, git_repository *repo, const git_commit *commit, const git_diff_options *opts);
+/* Merge two `git_diff`s according to the callback given by `cb`. */
+
+typedef git_diff_delta *(*git_diff__merge_cb)(
+ const git_diff_delta *left,
+ const git_diff_delta *right,
+ git_pool *pool);
+
+extern int git_diff__merge(
+ git_diff *onto, const git_diff *from, git_diff__merge_cb cb);
+
/*
* Sometimes a git_diff_file will have a zero size; this attempts to
* fill in the size without loading the blob if possible. If that is