From 3b6b783db797b593119756821c04ac64b66b7ffa Mon Sep 17 00:00:00 2001
From: "Lukas K." <lu@0x83.eu>
Date: Sun, 20 Oct 2024 21:41:00 +0200
Subject: [PATCH] make it build with libgit 1.8.2

Index: src/pool-prj-mgr/pool-mgr/pool_remote_box.cpp
--- src/pool-prj-mgr/pool-mgr/pool_remote_box.cpp.orig
+++ src/pool-prj-mgr/pool-mgr/pool_remote_box.cpp
@@ -1137,7 +1137,7 @@ void PoolRemoteBox::create_pr_thread()
 
             autofree_ptr<git_commit> parent_commit(git_commit_free);
             git_commit_lookup(&parent_commit.ptr, repo, &parent_oid);
-#if (LIBGIT2_VER_MAJOR == 1) && (LIBGIT2_VER_MINOR == 8)
+#if (LIBGIT2_VER_MAJOR == 1) && (LIBGIT2_VER_MINOR == 8) && (LIBGIT2_VER_REVISION < 2)
             git_commit *parent_commit_p = parent_commit.ptr;
 #else
             const git_commit *parent_commit_p = parent_commit.ptr;
@@ -1287,7 +1287,7 @@ void PoolRemoteBox::update_pr_thread()
                 throw std::runtime_error("error getting default signature");
             }
 
-#if (LIBGIT2_VER_MAJOR == 1) && (LIBGIT2_VER_MINOR == 8)
+#if (LIBGIT2_VER_MAJOR == 1) && (LIBGIT2_VER_MINOR == 8) && (LIBGIT2_VER_REVISION < 2)
             git_commit *parent_commit_p = latest_commit.ptr;
 #else
             const git_commit *parent_commit_p = latest_commit.ptr;
