enhance: skip scanning sub folders if current is not a git repository but has .git subfolder/file (#728)

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2024-11-21 12:56:12 +08:00
parent d3eca59036
commit 069dc255d1
No known key found for this signature in database

View file

@ -103,12 +103,12 @@ namespace SourceGit.ViewModels
if (test.IsSuccess && !string.IsNullOrEmpty(test.StdOut)) if (test.IsSuccess && !string.IsNullOrEmpty(test.StdOut))
{ {
var normalized = test.StdOut.Trim().Replace("\\", "/"); var normalized = test.StdOut.Trim().Replace("\\", "/");
if (!_managed.Contains(normalizedSelf)) if (!_managed.Contains(normalized))
outs.Add(normalized); outs.Add(normalized);
}
continue; continue;
} }
}
if (depth < 8) if (depth < 8)
GetUnmanagedRepositories(subdir, outs, opts, depth + 1); GetUnmanagedRepositories(subdir, outs, opts, depth + 1);