[PATCH 10/12] Support libgit2 api 0.24

Anton Lundin glance at acc.umu.se
Thu Jun 23 13:56:35 PDT 2016


Signed-off-by: Anton Lundin <glance at acc.umu.se>
---
 core/git-access.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/core/git-access.c b/core/git-access.c
index fe3a918..6fe90b0 100644
--- a/core/git-access.c
+++ b/core/git-access.c
@@ -308,7 +308,11 @@ static int try_to_git_merge(git_repository *repo, git_reference **local_p, git_r
 	}
 
 	git_merge_init_options(&merge_options, GIT_MERGE_OPTIONS_VERSION);
+#if !LIBGIT2_VER_MAJOR && LIBGIT2_VER_MINOR > 23
+	merge_options.flags = GIT_MERGE_FIND_RENAMES;
+#else
 	merge_options.tree_flags = GIT_MERGE_TREE_FIND_RENAMES;
+#endif
 	merge_options.file_favor = GIT_MERGE_FILE_FAVOR_UNION;
 	merge_options.rename_threshold = 100;
 	if (git_commit_lookup(&local_commit, repo, local_id)) {
-- 
2.7.4



More information about the subsurface mailing list