Remove auto-generation of .kateworkspace

Auto-generating .kateworkspace in detectWorkspace() was causing false
positives: it would create the marker in unrelated parent directories,
then detect them as workspaces on subsequent runs. The .kateworkspace
file should only be created explicitly via Create Workspace.
This commit is contained in:
Levi Neely 2026-07-23 09:03:46 +02:00
parent c2bbb81767
commit 28746d5363
1 changed files with 0 additions and 10 deletions

View File

@ -2333,16 +2333,6 @@ void GitPlusPlusView::detectWorkspace()
m_workspaceRepos = workspaceRepoPaths(); m_workspaceRepos = workspaceRepoPaths();
} }
// Auto-generate .kateworkspace if missing
wsFile = m_workspaceDir + QStringLiteral("/.kateworkspace");
if (!QFileInfo::exists(wsFile)) {
QSettings ws(wsFile, QSettings::IniFormat);
ws.beginGroup(QStringLiteral("workspace"));
ws.setValue(QStringLiteral("source"), QStringLiteral("."));
ws.endGroup();
ws.sync();
}
// Auto-generate .kateproject in each repo subdir that lacks one // Auto-generate .kateproject in each repo subdir that lacks one
for (const auto &repoPath : qAsConst(m_workspaceRepos)) { for (const auto &repoPath : qAsConst(m_workspaceRepos)) {
QString kateProjectFile = repoPath + QStringLiteral("/.kateproject"); QString kateProjectFile = repoPath + QStringLiteral("/.kateproject");