diff options
Diffstat (limited to 'src/plugins/git/gitplugin.cpp')
-rw-r--r-- | src/plugins/git/gitplugin.cpp | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/src/plugins/git/gitplugin.cpp b/src/plugins/git/gitplugin.cpp index 7d0f918c74..ab195cde66 100644 --- a/src/plugins/git/gitplugin.cpp +++ b/src/plugins/git/gitplugin.cpp @@ -1111,25 +1111,22 @@ bool GitPlugin::submitEditorAboutToClose() commitType, amendSHA1, m_commitMessageFileName, model); } - if (closeEditor) { - cleanCommitMessageFile(); - if (commitType == FixupCommit) { - if (!m_gitClient->beginStashScope(m_submitRepository, QLatin1String("Rebase-fixup"), NoPrompt)) - return false; - m_gitClient->interactiveRebase(m_submitRepository, amendSHA1, true); - } else { - m_gitClient->continueCommandIfNeeded(m_submitRepository); - } - } - - if (m_gitClient->checkCommandInProgress(m_submitRepository) == GitClient::NoCommand) { + if (!closeEditor) + return false; + cleanCommitMessageFile(); + if (commitType == FixupCommit) { + if (!m_gitClient->beginStashScope(m_submitRepository, QLatin1String("Rebase-fixup"), NoPrompt)) + return false; + m_gitClient->interactiveRebase(m_submitRepository, amendSHA1, true); + } else { + m_gitClient->continueCommandIfNeeded(m_submitRepository); if (editor->panelData().pushAction == NormalPush) m_gitClient->push(m_submitRepository); else if (editor->panelData().pushAction == PushToGerrit) connect(editor, SIGNAL(destroyed()), this, SLOT(delayedPushToGerrit())); } - return closeEditor; + return true; } void GitPlugin::fetch() |