Skip to content

Commit 24a6a13

Browse files
committed
Ensures that the welcome view will show
1 parent 478887b commit 24a6a13

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/views/worktreesView.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,11 @@ export class WorktreesViewNode extends RepositoriesSubscribeableNode<WorktreesVi
5555
this.view.message = 'Loading worktrees...';
5656

5757
const access = await this.view.container.git.access('worktrees');
58-
if (access.allowed === false) return [];
58+
if (access.allowed === false) {
59+
// Reset the message so the welcome view will show
60+
this.view.message = undefined;
61+
return [];
62+
}
5963

6064
if (this.view.container.git.isDiscoveringRepositories) {
6165
await this.view.container.git.isDiscoveringRepositories;
@@ -69,6 +73,8 @@ export class WorktreesViewNode extends RepositoriesSubscribeableNode<WorktreesVi
6973

7074
const repo = this.view.container.git.getBestRepositoryOrFirst();
7175
if (repo != null && !(await repo.git.supports('git:worktrees'))) {
76+
// Reset the message so the welcome view will show
77+
this.view.message = undefined;
7278
return [];
7379
}
7480

@@ -88,6 +94,8 @@ export class WorktreesViewNode extends RepositoriesSubscribeableNode<WorktreesVi
8894

8995
const grandChildren = await child.getChildren();
9096
if (grandChildren.length <= 1) {
97+
// Reset the message so the welcome view will show
98+
this.view.message = undefined;
9199
void child.ensureSubscription();
92100

93101
return [];

0 commit comments

Comments
 (0)