This repository was archived by the owner on Jun 21, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
src/GitHub.TeamFoundation.14/Services Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ public VSGitExt(IGitHubServiceProvider serviceProvider, IVSUIContextFactory fact
3838 context = factory . GetUIContext ( new Guid ( Guids . GitSccProviderId ) ) ;
3939
4040 // Start with empty array until we have a change to initialize.
41- ActiveRepositories = new ILocalRepositoryModel [ 0 ] ;
41+ ActiveRepositories = Array . Empty < ILocalRepositoryModel > ( ) ;
4242
4343 if ( context . IsActive && TryInitialize ( ) )
4444 {
@@ -97,7 +97,7 @@ void RefreshActiveRepositories()
9797 catch ( Exception e )
9898 {
9999 log . Error ( e , "Error refreshing repositories" ) ;
100- ActiveRepositories = new ILocalRepositoryModel [ 0 ] ;
100+ ActiveRepositories = Array . Empty < ILocalRepositoryModel > ( ) ;
101101 }
102102 }
103103
@@ -110,8 +110,11 @@ public IReadOnlyList<ILocalRepositoryModel> ActiveRepositories
110110
111111 private set
112112 {
113- activeRepositories = value ;
114- ActiveRepositoriesChanged ? . Invoke ( ) ;
113+ if ( value != activeRepositories )
114+ {
115+ activeRepositories = value ;
116+ ActiveRepositoriesChanged ? . Invoke ( ) ;
117+ }
115118 }
116119 }
117120
You can’t perform that action at this time.
0 commit comments