forked from qt-creator/qt-creator
Git: Avoid superfluous execution of git status on commit
Change-Id: I1cba2902165a36bd313672c5b0e15333da71cd6e Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
2a8350eca8
commit
1edc65cc1b
@@ -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<int>)), this, SLOT(slotDiffSelected(QList<int>)));
|
||||
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();
|
||||
|
||||
Reference in New Issue
Block a user