Browse Source

Fixes refresh of stashes and remotes

main
Eric Amodio 7 years ago
parent
commit
a7b8c243a4
2 changed files with 18 additions and 4 deletions
  1. +1
    -0
      CHANGELOG.md
  2. +17
    -4
      src/views/repositoryNode.ts

+ 1
- 0
CHANGELOG.md View File

@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
### Fixed
- Fixes issue where failed git commands would get stuck in the pending queue causing future similar commands to also fail
- Fixes issue where changes to git remotes would refresh the entire `GitLens` view
## [6.0.0] - 2017-11-08

+ 17
- 4
src/views/repositoryNode.ts View File

@ -63,11 +63,24 @@ export class RepositoryNode extends ExplorerNode {
private onRepoChanged(e: RepositoryChangeEvent) {
Logger.log(`RepositoryNode.onRepoChanged(${e.changes.join()}); triggering node refresh`);
let node: ExplorerNode | undefined;
if (this.children !== undefined && e.changed(RepositoryChange.Stashes, true)) {
node = this.children.find(c => c instanceof StashesNode);
if (this.children === undefined || e.changed(RepositoryChange.Repository) || e.changed(RepositoryChange.Config)) {
this.explorer.refreshNode(this);
return;
}
if (e.changed(RepositoryChange.Stashes)) {
const node = this.children.find(c => c instanceof StashesNode);
if (node !== undefined) {
this.explorer.refreshNode(node);
}
}
this.explorer.refreshNode(node || this);
if (e.changed(RepositoryChange.Remotes)) {
const node = this.children.find(c => c instanceof RemotesNode);
if (node !== undefined) {
this.explorer.refreshNode(node);
}
}
}
}

Loading…
Cancel
Save