We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 87bb7e0 + 8dd898e commit 2f73c08Copy full SHA for 2f73c08
src/NerdBank.GitVersioning/VersionOracle.cs
@@ -363,6 +363,11 @@ private static LibGit2Sharp.Repository OpenGitRepo(string repoRoot)
363
{
364
Requires.NotNullOrEmpty(repoRoot, nameof(repoRoot));
365
var gitDir = FindGitDir(repoRoot);
366
+
367
+ // Override Config Search paths to empty path to avoid new Repository instance to lookup for Global\System .gitconfig file
368
+ LibGit2Sharp.GlobalSettings.SetConfigSearchPaths(LibGit2Sharp.ConfigurationLevel.Global, string.Empty);
369
+ LibGit2Sharp.GlobalSettings.SetConfigSearchPaths(LibGit2Sharp.ConfigurationLevel.System, string.Empty);
370
371
return gitDir == null ? null : new LibGit2Sharp.Repository(gitDir);
372
}
373
0 commit comments