diff --git a/src/plugins/git/gitsubmiteditor.cpp b/src/plugins/git/gitsubmiteditor.cpp index 7857171768e..fb967d00a83 100644 --- a/src/plugins/git/gitsubmiteditor.cpp +++ b/src/plugins/git/gitsubmiteditor.cpp @@ -90,7 +90,8 @@ GitSubmitEditor::GitSubmitEditor(const VcsBase::VcsBaseSubmitEditorParameters *p m_model(0), m_commitEncoding(0), m_commitType(SimpleCommit), - m_forceClose(false) + m_forceClose(false), + m_firstUpdate(true) { connect(this, SIGNAL(diffSelectedFiles(QList)), this, SLOT(slotDiffSelected(QList))); connect(submitEditorWidget(), SIGNAL(show(QString)), this, SLOT(showCommit(QString))); @@ -173,6 +174,12 @@ void GitSubmitEditor::showCommit(const QString &commit) void GitSubmitEditor::updateFileModel() { + // Commit data is set when the editor is initialized, and updateFileModel immediately follows, + // when the editor is activated. Avoid another call to git status + if (m_firstUpdate) { + m_firstUpdate = false; + return; + } if (m_workingDirectory.isEmpty()) return; GitClient *client = GitPlugin::instance()->gitClient(); diff --git a/src/plugins/git/gitsubmiteditor.h b/src/plugins/git/gitsubmiteditor.h index e2e093cfe2f..452ccdaff11 100644 --- a/src/plugins/git/gitsubmiteditor.h +++ b/src/plugins/git/gitsubmiteditor.h @@ -80,6 +80,7 @@ private: QString m_amendSHA1; bool m_forceClose; QString m_workingDirectory; + bool m_firstUpdate; }; } // namespace Internal