summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2015-08-31 23:23:27 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-08-31 15:12:37 -0700
commit70d9297e3a5a1f3034c85a0907f6e2334503f2ca (patch)
treea63a6d051dff0bddc6a40111c904b32bfc710da7
parentb7038e4beca409c6ad0d71693b3be61ddccaf8b4 (diff)
downloadsubsurface-70d9297e3a5a1f3034c85a0907f6e2334503f2ca.tar.gz
Be compatible with libgit2 0.22 again
In libgit2 0.22 tree_flags was called flags. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--git-access.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/git-access.c b/git-access.c
index 388fa27e2..e09deb69a 100644
--- a/git-access.c
+++ b/git-access.c
@@ -195,7 +195,11 @@ static int try_to_git_merge(git_repository *repo, git_reference *local, git_refe
}
git_merge_init_options(&merge_options, GIT_MERGE_OPTIONS_VERSION);
+#ifdef USE_LIBGIT23_API
merge_options.tree_flags = GIT_MERGE_TREE_FIND_RENAMES;
+#else
+ merge_options.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))