Skip to content

Commit

Permalink
Merge pull request #3233 from cjmayo/git_remote_connect
Browse files Browse the repository at this point in the history
make compatible with libgit2 >= 0.24.0
  • Loading branch information
aknoerig authored Jun 12, 2016
2 parents 1bdaf5e + 4cb5185 commit 91014aa
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/version/partschecker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,13 @@ bool PartsChecker::newPartsAvailable(const QString &repoPath, const QString & sh
/**
* Connect to the remote.
*/
#if LIBGIT2_VER_MINOR > 24
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
error = git_remote_connect(remote, GIT_DIRECTION_FETCH, &callbacks);
#endif
if (error) {
partsCheckerResult.partsCheckerError = PARTS_CHECKER_ERROR_REMOTE;
partsCheckerResult.errorMessage = QObject::tr("Unable to access network site for '%1'. %2").arg(repoPath).arg(sBoilerPlate1);
Expand Down

0 comments on commit 91014aa

Please sign in to comment.