diff options
author | Orgad Shaneh <orgad.shaneh@audiocodes.com> | 2015-06-21 23:36:06 +0300 |
---|---|---|
committer | Orgad Shaneh <orgads@gmail.com> | 2015-06-22 09:20:19 +0000 |
commit | 2a1154870377d17aa4150fdfb490e5a4df0cb2a6 (patch) | |
tree | f07fb0a9c887a8e1ba2388e3b0b3bf10b92c3f66 | |
parent | 7e09b05ec11478e78c69140a2ef4e833b53da730 (diff) | |
download | qt-creator-2a1154870377d17aa4150fdfb490e5a4df0cb2a6.tar.gz |
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>
-rw-r--r-- | src/plugins/git/gitclient.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/plugins/git/gitclient.cpp b/src/plugins/git/gitclient.cpp index 8e29f4012b..762e056f7f 100644 --- a/src/plugins/git/gitclient.cpp +++ b/src/plugins/git/gitclient.cpp @@ -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) |