Gerrit: Minor cleanup

Change-Id: I7bfa74053c41c68b956929b73a9b50bf77cbf6e4
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Orgad Shaneh
2017-03-12 23:55:11 +02:00
committed by Orgad Shaneh
parent f9b556621c
commit dbe77890cd

View File

@@ -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()