Skip to content

Commit

Permalink
make it build with libgit 1.8.2
Browse files Browse the repository at this point in the history
  • Loading branch information
carrotIndustries committed Oct 20, 2024
1 parent 1ef4704 commit 3b6b783
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/pool-prj-mgr/pool-mgr/pool_git_box.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ void PoolGitBox::handle_pr()
git_signature_default(&signature.ptr, repo);

git_oid new_commit_oid;
#if (LIBGIT2_VER_MAJOR == 1) && (LIBGIT2_VER_MINOR == 8)
#if (LIBGIT2_VER_MAJOR == 1) && (LIBGIT2_VER_MINOR == 8) && (LIBGIT2_VER_REVISION < 2)
std::array<git_commit *, 2> parents;
#else
std::array<const git_commit *, 2> parents;
Expand Down
4 changes: 2 additions & 2 deletions src/pool-prj-mgr/pool-mgr/pool_remote_box.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 3b6b783

Please sign in to comment.