Merge claudedo/58764ab72f3e41e0871b9c81149ba1cc

This commit is contained in:
mika kuns
2026-08-06 14:39:06 +02:00
3 changed files with 37 additions and 4 deletions
@@ -117,6 +117,29 @@ public sealed class RepoScannerTests : IDisposable
Assert.Empty(result);
}
[Fact]
public void Scan_ReturnsEmptyWhenRootIsAReparsePoint()
{
var repo = MakeDir("real-repo");
Directory.CreateDirectory(Path.Combine(repo, ".git"));
var junction = Path.Combine(_root, "junction-to-real-repo");
var mklink = System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo
{
FileName = "cmd.exe",
Arguments = $"/c mklink /J \"{junction}\" \"{repo}\"",
UseShellExecute = false,
RedirectStandardOutput = true,
RedirectStandardError = true,
})!;
mklink.WaitForExit();
Assert.True(Directory.Exists(junction), "Failed to create test junction: " + mklink.StandardError.ReadToEnd());
var result = RepoScanner.Scan(junction);
Assert.Empty(result);
}
[Fact]
#pragma warning disable CA1416 // ACL manipulation is Windows-only; this test targets the Windows dev/CI environment
public void Scan_ContinuesAfterUnreadableSubdirectory()