forked from qt-creator/qt-creator
Git: bug fix for diff and log in BranchesDialog
Branch log and diff were sometimes having problems. I have project in main git module, and I was not able to get branch diff and log in a submodule, because they open new editor and as soon as it is opened m_repository changes to the master module. Since repository working dir is set after editor opens, it is already changed in branchModel Branch diff and log should now work as expected. Change-Id: I72f730d77b8fe23ef6eac757415fe96321ef147b Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
@@ -267,7 +267,8 @@ void BranchDialog::diff()
|
|||||||
QString branchName = m_model->branchName(selectedIndex());
|
QString branchName = m_model->branchName(selectedIndex());
|
||||||
if (branchName.isEmpty())
|
if (branchName.isEmpty())
|
||||||
return;
|
return;
|
||||||
GitPlugin::instance()->gitClient()->diffBranch(m_repository, QStringList(), branchName);
|
// Do not pass working dir by reference since it might change
|
||||||
|
GitPlugin::instance()->gitClient()->diffBranch(QString(m_repository), QStringList(), branchName);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BranchDialog::log()
|
void BranchDialog::log()
|
||||||
@@ -275,7 +276,8 @@ void BranchDialog::log()
|
|||||||
QString branchName = m_model->branchName(selectedIndex());
|
QString branchName = m_model->branchName(selectedIndex());
|
||||||
if (branchName.isEmpty())
|
if (branchName.isEmpty())
|
||||||
return;
|
return;
|
||||||
GitPlugin::instance()->gitClient()->graphLog(m_repository, branchName);
|
// Do not pass working dir by reference since it might change
|
||||||
|
GitPlugin::instance()->gitClient()->graphLog(QString(m_repository), branchName);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BranchDialog::merge()
|
void BranchDialog::merge()
|
||||||
|
Reference in New Issue
Block a user