Git: Fix Stash & Pop for synchronous actions

After a successful Cherry-Pick or Revert, a ConflictHandler needs be
instantiated in order to call endStashScope.

This was broken in b6608d0d3.

Change-Id: I2e828fa87695b9ac9972fca569e473b5f63abfec
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
Orgad Shaneh
2015-06-21 23:36:06 +03:00
committed by Orgad Shaneh
parent 7e09b05ec1
commit 2a11548703

View File

@@ -485,6 +485,9 @@ public:
const QString &abortCommand = QString())
{
ConflictHandler handler(workingDirectory, abortCommand);
// No conflicts => do nothing
if (response.result == SynchronousProcessResponse::Finished)
return;
handler.readStdOut(response.stdOut);
handler.readStdErr(response.stdErr);
}
@@ -2750,10 +2753,8 @@ bool GitClient::executeAndHandleConflicts(const QString &workingDirectory,
| VcsCommand::ShowSuccessMessage;
const SynchronousProcessResponse resp = vcsSynchronousExec(workingDirectory, arguments, flags);
// Notify about changed files or abort the rebase.
const bool ok = resp.result == SynchronousProcessResponse::Finished;
if (!ok)
ConflictHandler::handleResponse(resp, workingDirectory, abortCommand);
return ok;
ConflictHandler::handleResponse(resp, workingDirectory, abortCommand);
return resp.result == SynchronousProcessResponse::Finished;
}
bool GitClient::synchronousPull(const QString &workingDirectory, bool rebase)