conversationRepository: fix build with libgit 1.8.0

Change-Id: Ieede07472435b7f8ae0b19a0ec2afad94e195fee
This commit is contained in:
Sébastien Blin
2024-05-10 09:47:16 -04:00
parent d8efbc0213
commit 07d673d0c7

View File

@ -294,7 +294,12 @@ ConversationRepositoryTest::addCommit(git_repository* repo,
GitTree tree = {tree_ptr, git_tree_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
const git_commit* head_ref[1] = {head_commit.get()};
#endif
if (git_commit_create_buffer(&to_sign,
repo,
sig.get(),