Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit 604a82c

Browse files
committed
Access GetRepositoryFromSolution from inside using
Dispose of Repository object.
1 parent 8b17782 commit 604a82c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/GitHub.TeamFoundation.14/Services/VSGitServices.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,12 @@ public string GetActiveRepoPath()
116116
if (repo != null)
117117
ret = repo.RepositoryPath;
118118
if (ret == null)
119-
ret = serviceProvider.GetSolution().GetRepositoryFromSolution()?.Info?.Path;
119+
{
120+
using (var repository = serviceProvider.GetSolution().GetRepositoryFromSolution())
121+
{
122+
ret = repository?.Info?.Path;
123+
}
124+
}
120125
return ret ?? String.Empty;
121126
}
122127

0 commit comments

Comments
 (0)