File tree Expand file tree Collapse file tree 2 files changed +18
-4
lines changed Expand file tree Collapse file tree 2 files changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
1010
1111### Fixed
1212- Fixes issue where failed git commands would get stuck in the pending queue causing future similar commands to also fail
13+ - Fixes issue where changes to git remotes would refresh the entire ` GitLens ` view
1314
1415## [ 6.0.0] - 2017-11-08
1516
Original file line number Diff line number Diff line change @@ -63,11 +63,24 @@ export class RepositoryNode extends ExplorerNode {
6363 private onRepoChanged ( e : RepositoryChangeEvent ) {
6464 Logger . log ( `RepositoryNode.onRepoChanged(${ e . changes . join ( ) } ); triggering node refresh` ) ;
6565
66- let node : ExplorerNode | undefined ;
67- if ( this . children !== undefined && e . changed ( RepositoryChange . Stashes , true ) ) {
68- node = this . children . find ( c => c instanceof StashesNode ) ;
66+ if ( this . children === undefined || e . changed ( RepositoryChange . Repository ) || e . changed ( RepositoryChange . Config ) ) {
67+ this . explorer . refreshNode ( this ) ;
68+
69+ return ;
70+ }
71+
72+ if ( e . changed ( RepositoryChange . Stashes ) ) {
73+ const node = this . children . find ( c => c instanceof StashesNode ) ;
74+ if ( node !== undefined ) {
75+ this . explorer . refreshNode ( node ) ;
76+ }
6977 }
7078
71- this . explorer . refreshNode ( node || this ) ;
79+ if ( e . changed ( RepositoryChange . Remotes ) ) {
80+ const node = this . children . find ( c => c instanceof RemotesNode ) ;
81+ if ( node !== undefined ) {
82+ this . explorer . refreshNode ( node ) ;
83+ }
84+ }
7285 }
7386}
You can’t perform that action at this time.
0 commit comments