diff --git a/packages/steiger/src/features/choose-root-folder/choose-from-similar.ts b/packages/steiger/src/features/choose-root-folder/choose-from-similar.ts index bf2178c..bfa4257 100644 --- a/packages/steiger/src/features/choose-root-folder/choose-from-similar.ts +++ b/packages/steiger/src/features/choose-root-folder/choose-from-similar.ts @@ -20,7 +20,7 @@ export async function chooseFromSimilar(input: string): Promise { const existingDir = await resolveWithCorrections(dir || '.') const candidates = (await readdir(existingDir, { withFileTypes: true })) - .filter((entry) => entry.isDirectory() && !isIgnored(join(existingDir, entry.name))) + .filter((entry) => entry.isDirectory() && entry.name !== '.git' && !isIgnored(join(existingDir, entry.name))) .map((entry) => entry.name) const withDistances = candidates.map((candidate) => [candidate, distance(candidate, base)] as const) const suggestions = withDistances diff --git a/packages/steiger/src/features/transfer-fs-to-vfs.ts b/packages/steiger/src/features/transfer-fs-to-vfs.ts index 02de8ae..d22a825 100644 --- a/packages/steiger/src/features/transfer-fs-to-vfs.ts +++ b/packages/steiger/src/features/transfer-fs-to-vfs.ts @@ -16,7 +16,7 @@ export async function createWatcher(path: string) { const isIgnored = await isGitIgnored({ cwd: find.up('.git', { cwd: path }) ?? path }) const watcher = chokidar.watch(path, { - ignored: (path) => path.split(sep).includes('node_modules') || isIgnored(path), + ignored: (path) => path.split(sep).includes('node_modules') || path.split(sep).includes('.git') || isIgnored(path), ignoreInitial: false, alwaysStat: true, awaitWriteFinish: true,