Commit 80a71076 authored by Petar Perisin's avatar Petar Perisin
Browse files

Git - execute fetch asynchronously



Change-Id: Ic2243adaa36444099f834676186331927f3f4588
Reviewed-by: default avatarOrgad Shaneh <orgads@gmail.com>
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
parent 26142b84
......@@ -2839,16 +2839,13 @@ void GitClient::revert(const QStringList &files, bool revertStaging)
}
}
bool GitClient::synchronousFetch(const QString &workingDirectory, const QString &remote)
void GitClient::fetch(const QString &workingDirectory, const QString &remote)
{
QStringList arguments(QLatin1String("fetch"));
arguments << (remote.isEmpty() ? QLatin1String("--all") : remote);
// Disable UNIX terminals to suppress SSH prompting.
const unsigned flags = VcsBase::VcsBasePlugin::SshPasswordPrompt|VcsBase::VcsBasePlugin::ShowStdOutInLogWindow
|VcsBase::VcsBasePlugin::ShowSuccessMessage;
const Utils::SynchronousProcessResponse resp = synchronousGit(workingDirectory, arguments, flags);
return resp.result == Utils::SynchronousProcessResponse::Finished;
VcsBase::Command *cmd = executeGit(workingDirectory, arguments, 0, true);
connectRepositoryChanged(workingDirectory, cmd);
}
bool GitClient::executeAndHandleConflicts(const QString &workingDirectory,
......
......@@ -238,7 +238,7 @@ public:
bool cloneRepository(const QString &directory, const QByteArray &url);
QString vcsGetRepositoryURL(const QString &directory);
bool synchronousFetch(const QString &workingDirectory, const QString &remote);
void fetch(const QString &workingDirectory, const QString &remote);
bool synchronousPull(const QString &workingDirectory, bool rebase);
bool synchronousPush(const QString &workingDirectory,
const QStringList &pushArgs = QStringList());
......
......@@ -1075,7 +1075,7 @@ bool GitPlugin::submitEditorAboutToClose()
void GitPlugin::fetch()
{
m_gitClient->synchronousFetch(currentState().topLevel(), QString());
m_gitClient->fetch(currentState().topLevel(), QString());
}
void GitPlugin::pull()
......
......@@ -184,7 +184,7 @@ void RemoteDialog::fetchFromRemote()
int row = indexList.at(0).row();
const QString remoteName = m_remoteModel->remoteName(row);
m_remoteModel->client()->synchronousFetch(m_remoteModel->workingDirectory(), remoteName);
m_remoteModel->client()->fetch(m_remoteModel->workingDirectory(), remoteName);
}
void RemoteDialog::updateButtonState()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment