From 419701acf1ae9a6b6ca175e9e05585264f45b551 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= Date: Sun, 22 May 2022 13:36:15 +0200 Subject: [PATCH 1/2] Use system libgit2 --- phoenix.pro | 2 +- src/version/partschecker.cpp | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/phoenix.pro b/phoenix.pro index dab1ba21..2df1e6c0 100644 --- a/phoenix.pro +++ b/phoenix.pro @@ -175,7 +175,7 @@ RC_FILE = fritzing.rc RESOURCES += phoenixresources.qrc # Disable this if you have (and want) libgit2 dynamically -LIBGIT_STATIC = true +LIBGIT_STATIC = false include(pri/libgit2detect.pri) include(pri/boostdetect.pri) diff --git a/src/version/partschecker.cpp b/src/version/partschecker.cpp index 581bd491..868c15f5 100644 --- a/src/version/partschecker.cpp +++ b/src/version/partschecker.cpp @@ -117,9 +117,10 @@ bool PartsChecker::newPartsAvailable(const QString &repoPath, const QString & sh /** * Connect to the remote. */ + DebugDialog::debug(QString("remote %1").arg(git_remote_url(remote))); -#if LIBGIT2_VER_MAJOR > 0 || (LIBGIT2_VER_MAJOR == 0 && LIBGIT2_VER_MINOR > 24) - error = git_remote_connect(remote, GIT_DIRECTION_FETCH, &callbacks, NULL, NULL); +#if LIBGIT2_VER_MINOR > 24 || LIBGIT2_VER_MAJOR >= 1 + error = git_remote_connect(remote, GIT_DIRECTION_FETCH, &callbacks, NULL, NULL); #elif LIBGIT2_VER_MINOR == 24 error = git_remote_connect(remote, GIT_DIRECTION_FETCH, &callbacks, NULL); #else -- 2.36.0