aboutsummaryrefslogtreecommitdiffstats
path: root/core/git-access.c
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2016-06-23 22:56:35 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-06-23 16:35:39 -0700
commit7c7588a9867e21ce6b1b9c4f843f9806081c9dd9 (patch)
treef2bbe04bda3c8e83e4c6f1c47bd3e84d568e0de8 /core/git-access.c
parentb2b29c00ecc1fe63947d97fe0d09b23fe196ff01 (diff)
downloadsubsurface-7c7588a9867e21ce6b1b9c4f843f9806081c9dd9.tar.gz
Support libgit2 api 0.24
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/git-access.c')
-rw-r--r--core/git-access.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/git-access.c b/core/git-access.c
index fe3a918ac..6fe90b0a9 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)) {