Git: Do not prompt to add files in a submodule

Fixes: QTCREATORBUG-23845
Change-Id: Ibf20eed26469b5a8599927e5ac2d458bbff9a156
Reviewed-by: André Hartmann <aha_1980@gmx.de>
This commit is contained in:
Orgad Shaneh
2020-09-27 16:01:14 +03:00
committed by Orgad Shaneh
parent c0b001737c
commit 48c56416f5
6 changed files with 34 additions and 29 deletions

View File

@@ -161,11 +161,11 @@ IVersionControl::~IVersionControl()
delete m_topicCache;
}
QStringList IVersionControl::unmanagedFiles(const QString &workingDir,
const QStringList &filePaths) const
QStringList IVersionControl::unmanagedFiles(const QStringList &filePaths) const
{
return Utils::filtered(filePaths, [wd = QDir(workingDir), this](const QString &f) {
return !managesFile(wd.path(), wd.relativeFilePath(f));
return Utils::filtered(filePaths, [this](const QString &f) {
const Utils::FilePath fp = Utils::FilePath::fromString(f);
return !managesFile(fp.parentDir().toString(), fp.fileName());
});
}