Git: Replace findRepository with VcsManager::findTopLevel

Take advantage of its cache

Change-Id: Ibf3b3b59821a92cd4475c6f8d6dd8212983d5c96
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
Orgad Shaneh
2014-07-02 22:54:12 +03:00
committed by Orgad Shaneh
parent 166c1f51a4
commit 0544f9dd05
3 changed files with 11 additions and 8 deletions

View File

@@ -33,6 +33,8 @@
#include "gitclient.h"
#include "ui_changeselectiondialog.h"
#include <coreplugin/vcsmanager.h>
#include <QProcess>
#include <QFormLayout>
#include <QHBoxLayout>
@@ -142,7 +144,7 @@ QString ChangeSelectionDialog::workingDirectory() const
if (workingDir.isEmpty() || !QDir(workingDir).exists())
return QString();
return GitPlugin::instance()->gitClient()->findRepositoryForDirectory(workingDir);
return Core::VcsManager::findTopLevelForDirectory(workingDir);
}
ChangeCommand ChangeSelectionDialog::command() const