From dbe77890cdb8f28296fc92be942cd2a0342b67b6 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Sun, 12 Mar 2017 23:55:11 +0200 Subject: [PATCH] Gerrit: Minor cleanup Change-Id: I7bfa74053c41c68b956929b73a9b50bf77cbf6e4 Reviewed-by: Orgad Shaneh --- src/plugins/git/gerrit/gerritserver.cpp | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) 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()