forked from qt-creator/qt-creator
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:
committed by
Orgad Shaneh
parent
7e09b05ec1
commit
2a11548703
@@ -485,6 +485,9 @@ public:
|
|||||||
const QString &abortCommand = QString())
|
const QString &abortCommand = QString())
|
||||||
{
|
{
|
||||||
ConflictHandler handler(workingDirectory, abortCommand);
|
ConflictHandler handler(workingDirectory, abortCommand);
|
||||||
|
// No conflicts => do nothing
|
||||||
|
if (response.result == SynchronousProcessResponse::Finished)
|
||||||
|
return;
|
||||||
handler.readStdOut(response.stdOut);
|
handler.readStdOut(response.stdOut);
|
||||||
handler.readStdErr(response.stdErr);
|
handler.readStdErr(response.stdErr);
|
||||||
}
|
}
|
||||||
@@ -2750,10 +2753,8 @@ bool GitClient::executeAndHandleConflicts(const QString &workingDirectory,
|
|||||||
| VcsCommand::ShowSuccessMessage;
|
| VcsCommand::ShowSuccessMessage;
|
||||||
const SynchronousProcessResponse resp = vcsSynchronousExec(workingDirectory, arguments, flags);
|
const SynchronousProcessResponse resp = vcsSynchronousExec(workingDirectory, arguments, flags);
|
||||||
// Notify about changed files or abort the rebase.
|
// Notify about changed files or abort the rebase.
|
||||||
const bool ok = resp.result == SynchronousProcessResponse::Finished;
|
ConflictHandler::handleResponse(resp, workingDirectory, abortCommand);
|
||||||
if (!ok)
|
return resp.result == SynchronousProcessResponse::Finished;
|
||||||
ConflictHandler::handleResponse(resp, workingDirectory, abortCommand);
|
|
||||||
return ok;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GitClient::synchronousPull(const QString &workingDirectory, bool rebase)
|
bool GitClient::synchronousPull(const QString &workingDirectory, bool rebase)
|
||||||
|
Reference in New Issue
Block a user