fix(ui): stop treating git worktrees and submodules as repos

.git as a file (worktrees, submodules) isn't a standalone repo — the
scanner was flooding the import list with worktree entries alongside
their real repo.
This commit is contained in:
mika kuns
2026-09-02 09:59:12 +02:00
parent 30d0611b8e
commit b6e5876b07
2 changed files with 9 additions and 9 deletions
+3 -5
View File
@@ -67,9 +67,7 @@ public static class RepoScanner
}
}
private static bool IsRepo(string dir)
{
var gitPath = Path.Combine(dir, ".git");
return Directory.Exists(gitPath) || File.Exists(gitPath);
}
// A real clone has .git as a directory. Worktrees and submodules have it as a file
// ("gitdir: ...") — those are not standalone repos and would flood the list.
private static bool IsRepo(string dir) => Directory.Exists(Path.Combine(dir, ".git"));
}