diff options
| author | Orgad Shaneh <[email protected]> | 2018-06-17 23:45:42 +0300 |
|---|---|---|
| committer | Orgad Shaneh <[email protected]> | 2018-06-19 09:37:06 +0000 |
| commit | 23b8e6d531fd13eb47e4705d183c09800e96c46f (patch) | |
| tree | c441e45c00c8d837b4296ff7bd0071e7c2d57e37 /src/plugins/git/gitplugin.cpp | |
| parent | 14fb71ececdd86993c15a9d8199f47dab3854fb0 (diff) | |
Git: Minor cleanup in commit processing
Change-Id: I99214441059a097b8aeb197638fc58e407a7d27b
Reviewed-by: Tobias Hunger <[email protected]>
Diffstat (limited to 'src/plugins/git/gitplugin.cpp')
| -rw-r--r-- | src/plugins/git/gitplugin.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/plugins/git/gitplugin.cpp b/src/plugins/git/gitplugin.cpp index 391d27961f9..04f6b2e8d42 100644 --- a/src/plugins/git/gitplugin.cpp +++ b/src/plugins/git/gitplugin.cpp @@ -1069,7 +1069,6 @@ bool GitPlugin::submitEditorAboutToClose() // Go ahead! SubmitFileModel *model = qobject_cast<SubmitFileModel *>(editor->fileModel()); - bool closeEditor = true; CommitType commitType = editor->commitType(); QString amendSHA1 = editor->amendSHA1(); if (model->hasCheckedFiles() || !amendSHA1.isEmpty()) { @@ -1077,12 +1076,11 @@ bool GitPlugin::submitEditorAboutToClose() if (!DocumentManager::saveDocument(editorDocument)) return false; - closeEditor = m_gitClient->addAndCommit(m_submitRepository, editor->panelData(), - commitType, amendSHA1, - m_commitMessageFileName, model); + if (!m_gitClient->addAndCommit(m_submitRepository, editor->panelData(), commitType, + amendSHA1, m_commitMessageFileName, model)) { + return false; + } } - if (!closeEditor) - return false; cleanCommitMessageFile(); if (commitType == FixupCommit) { if (!m_gitClient->beginStashScope(m_submitRepository, "Rebase-fixup", |
