Skip to content

Commit b391ea4

Browse files
committed
fix partly stale tree if "root" config changed
1 parent 0bba3fc commit b391ea4

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.12.1
2+
3+
* Fix partly stale tree if "root" config value is changed
4+
15
## 1.12.0
26

37
* Add button to switch between list and tree [#26](https://github.com/letmaik/vscode-git-tree-compare/issues/)

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "git-tree-compare",
33
"displayName": "Git Tree Compare",
44
"description": "Diff your worktree against a branch, tag, or commit in a tree -- especially useful for pull request preparation or merge preview",
5-
"version": "1.12.0",
5+
"version": "1.12.1",
66
"author": {
77
"name": "Maik Riechert",
88
"url": "https://github.com/letmaik"
@@ -304,7 +304,7 @@
304304
"workspace",
305305
"repository"
306306
],
307-
"description": "The root of the tree when the workspace folder is not the same as the repository root. Has no effect if view is set to list.",
307+
"description": "The root of the tree when the workspace folder is not the same as the repository root.",
308308
"default": "workspace"
309309
},
310310
"gitTreeCompare.includeFilesOutsideWorkspaceRoot": {

src/treeProvider.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -713,12 +713,14 @@ export class GitTreeCompareProvider implements TreeDataProvider<Element>, Dispos
713713
return;
714714
}
715715

716+
const oldTreeRoot = this.treeRoot;
716717
if (oldTreeRootIsRepo != this.treeRootIsRepo) {
717718
this.updateTreeRootFolder();
718719
}
719720

720721
if (oldFullDiff != this.fullDiff ||
721722
oldFindRenames != this.findRenames ||
723+
oldTreeRoot != this.treeRoot ||
722724
(!oldAutoRefresh && this.autoRefresh) ||
723725
(!oldRefreshIndex && this.refreshIndex)) {
724726
await this.updateRefs(this.baseRef);

0 commit comments

Comments
 (0)