Skip to content

Commit 3eefaca

Browse files
Fixes timing issue with create/delete worktree repo actions
1 parent 0f4d15e commit 3eefaca

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/env/node/git/localGitProvider.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5684,6 +5684,7 @@ export class LocalGitProvider implements GitProvider, Disposable {
56845684

56855685
try {
56865686
await this.git.worktree__add(repoPath, path, options);
5687+
this.container.events.fire('git:cache:reset', { repoPath: repoPath, caches: ['worktrees'] });
56875688
if (options?.createBranch) {
56885689
this.container.events.fire('git:cache:reset', { repoPath: repoPath, caches: ['branches'] });
56895690
}
@@ -5771,6 +5772,7 @@ export class LocalGitProvider implements GitProvider, Disposable {
57715772

57725773
try {
57735774
await this.git.worktree__remove(repoPath, normalizePath(path), options);
5775+
this.container.events.fire('git:cache:reset', { repoPath: repoPath, caches: ['worktrees'] });
57745776
} catch (ex) {
57755777
Logger.error(ex, scope);
57765778

0 commit comments

Comments
 (0)