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

Commit e91e207

Browse files
committed
Make it so the main project doesn't need a direct reference to libgit2sharp, for ease of packaging
1 parent d33b726 commit e91e207

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

src/GitHub.Exports/Services/Services.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,5 +166,10 @@ public static Repository GetRepoFromIGit(this IGitRepositoryInfo repoInfo)
166166
return null;
167167
return new Repository(repoPath);
168168
}
169+
170+
public static UriString GetUriFromRepository(this IGitRepositoryInfo repoInfo)
171+
{
172+
return repoInfo.GetRepoFromIGit()?.GetUri();
173+
}
169174
}
170175
}

src/GitHub.VisualStudio/Base/TeamExplorerItemBase.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@ protected virtual void RepoChanged()
4747
var repo = ActiveRepo;
4848
if (repo != null)
4949
{
50-
var gitRepo = repo.GetRepoFromIGit();
51-
var uri = gitRepo?.GetUri();
50+
var uri = repo.GetUriFromRepository();
5251
var name = uri?.RepositoryName;
5352
if (name != null)
5453
{

src/GitHub.VisualStudio/GitHub.VisualStudio.csproj

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -396,12 +396,6 @@
396396
<IncludeOutputGroupsInVSIX>BuiltProjectOutputGroup;GetCopyToOutputDirectoryItems;DebugSymbolsProjectOutputGroup;</IncludeOutputGroupsInVSIX>
397397
<IncludeOutputGroupsInVSIXLocalOnly>DebugSymbolsProjectOutputGroup;</IncludeOutputGroupsInVSIXLocalOnly>
398398
</ProjectReference>
399-
<ProjectReference Include="..\..\submodules\libgit2sharp\LibGit2Sharp\LibGit2Sharp.csproj">
400-
<Project>{ee6ed99f-cb12-4683-b055-d28fc7357a34}</Project>
401-
<Name>LibGit2Sharp</Name>
402-
<IncludeOutputGroupsInVSIX>BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bDebugSymbolsProjectOutputGroup%3b</IncludeOutputGroupsInVSIX>
403-
<IncludeOutputGroupsInVSIXLocalOnly>DebugSymbolsProjectOutputGroup%3b</IncludeOutputGroupsInVSIXLocalOnly>
404-
</ProjectReference>
405399
<ProjectReference Include="..\..\submodules\octokit.net\Octokit.Reactive\Octokit.Reactive.csproj">
406400
<Project>{674b69b8-0780-4d54-ae2b-c15821fa51cb}</Project>
407401
<Name>Octokit.Reactive</Name>

0 commit comments

Comments
 (0)