diff --git a/src/plugins/git/gerrit/gerritserver.cpp b/src/plugins/git/gerrit/gerritserver.cpp index 990279951dc..ea80e8d6e2b 100644 --- a/src/plugins/git/gerrit/gerritserver.cpp +++ b/src/plugins/git/gerrit/gerritserver.cpp @@ -131,19 +131,17 @@ bool GerritServer::fillFromRemote(const QString &remote, const GerritParameters host = r.host; port = r.port; user.userName = r.userName.isEmpty() ? parameters.server.user.userName : r.userName; - if (type != GerritServer::Ssh) { - curlBinary = parameters.curl; - if (curlBinary.isEmpty() || !QFile::exists(curlBinary)) - return false; - rootPath = r.path; - // Strip the last part of the path, which is always the repo name - // The rest of the path needs to be inspected to find the root path - // (can be http://example.net/review) - ascendPath(); - if (!resolveRoot()) - return false; - } - return true; + if (type == GerritServer::Ssh) + return true; + curlBinary = parameters.curl; + if (curlBinary.isEmpty() || !QFile::exists(curlBinary)) + return false; + rootPath = r.path; + // Strip the last part of the path, which is always the repo name + // The rest of the path needs to be inspected to find the root path + // (can be http://example.net/review) + ascendPath(); + return resolveRoot(); } QStringList GerritServer::curlArguments()