From 069dc255d1d9892cb1a3cef35bab5af18091f09f Mon Sep 17 00:00:00 2001 From: leo Date: Thu, 21 Nov 2024 12:56:12 +0800 Subject: [PATCH] enhance: skip scanning sub folders if current is not a git repository but has `.git` subfolder/file (#728) Signed-off-by: leo --- src/ViewModels/ScanRepositories.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ViewModels/ScanRepositories.cs b/src/ViewModels/ScanRepositories.cs index 7b52c670..923413a3 100644 --- a/src/ViewModels/ScanRepositories.cs +++ b/src/ViewModels/ScanRepositories.cs @@ -103,11 +103,11 @@ namespace SourceGit.ViewModels if (test.IsSuccess && !string.IsNullOrEmpty(test.StdOut)) { var normalized = test.StdOut.Trim().Replace("\\", "/"); - if (!_managed.Contains(normalizedSelf)) + if (!_managed.Contains(normalized)) outs.Add(normalized); - - continue; } + + continue; } if (depth < 8)