forked from qt-creator/qt-creator
Git: Minor cleanup in commit processing
Change-Id: I99214441059a097b8aeb197638fc58e407a7d27b Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
14fb71ecec
commit
23b8e6d531
@@ -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",
|
||||
|
Reference in New Issue
Block a user