Skip to content
Snippets Groups Projects
Commit d8efbc02 authored by Sébastien Blin's avatar Sébastien Blin
Browse files

misc: fix build for libgit > 1.8.0

Change-Id: I5576412901a12be74395823a6abf7954bbd72b73
parent 072fef2e
No related branches found
No related tags found
No related merge requests found
......@@ -249,7 +249,13 @@ commitInRepo(const std::string& path, std::shared_ptr<JamiAccount> account, cons
GitCommit head_commit {head_ptr, git_commit_free};
git_buf to_sign = {};
#if( LIBGIT2_VER_MAJOR > 1 ) || ( LIBGIT2_VER_MAJOR == 1 && LIBGIT2_VER_MINOR >= 8 )
// For libgit2 version 1.8.0 and above
git_commit* const head_ref[1] = {head_commit.get()};
#else
// For libgit2 versions older than 1.8.0
const git_commit* head_ref[1] = {head_commit.get()};
#endif
if (git_commit_create_buffer(
&to_sign, repo, sig.get(), sig.get(), nullptr, msg.c_str(), tree.get(), 1, &head_ref[0])
< 0) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment