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

Commit ddbec51

Browse files
committed
Auto-load GitHubPackage when there is an active repository
Make GitHubPackage auto-load on backgroundLoad thread.
1 parent ef83dc2 commit ddbec51

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/GitHub.VisualStudio/GitHubPackage.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ namespace GitHub.VisualStudio
2828
[InstalledProductRegistration("#110", "#112", System.AssemblyVersionInformation.Version, IconResourceID = 400)]
2929
[Guid(Guids.guidGitHubPkgString)]
3030
[ProvideMenuResource("Menus.ctmenu", 1)]
31-
// this is the Git service GUID, so we load whenever it loads
32-
[ProvideAutoLoad(Guids.GitSccProviderId)]
31+
// Only initialize when we're in the context of a Git repository.
32+
[ProvideAutoLoad(Guids.UIContext_Git, PackageAutoLoadFlags.BackgroundLoad)]
3333
[ProvideToolWindow(typeof(GitHubPane), Orientation = ToolWindowOrientation.Right, Style = VsDockStyle.Tabbed, Window = EnvDTE.Constants.vsWindowKindSolutionExplorer)]
3434
[ProvideOptionPage(typeof(OptionsPage), "GitHub for Visual Studio", "General", 0, 0, supportsAutomation: true)]
3535
public class GitHubPackage : AsyncPackage

0 commit comments

Comments
 (0)