Преглед изворни кода

Fixes refresh of stashes and remotes

main
Eric Amodio пре 7 година
родитељ
комит
a7b8c243a4
2 измењених фајлова са 18 додато и 4 уклоњено
  1. +1
    -0
      CHANGELOG.md
  2. +17
    -4
      src/views/repositoryNode.ts

+ 1
- 0
CHANGELOG.md Прегледај датотеку

@ -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 Прегледај датотеку

@ -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…
Откажи
Сачувај