Skip to content

Commit 3fbdc74

Browse files
committed
Update currently selected worktree when renaming
This affects both our showWorktreesInRepoList feature as well as the upstream worktrees implementation. Should replace with the upstream fix once it's ready
1 parent 4c48e79 commit 3fbdc74

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

app/src/lib/stores/app-store.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6827,7 +6827,11 @@ export class AppStore extends TypedBaseStore<IAppState> {
68276827
newPath: string
68286828
): Promise<void> {
68296829
await moveWorktree(repository, worktreePath, newPath)
6830-
await this._refreshWorktrees(repository)
6830+
const result = await this.repositoriesStore.switchWorktree(
6831+
repository,
6832+
newPath
6833+
)
6834+
await this._refreshWorktrees(result.repository)
68316835
}
68326836

68336837
public _setWorktreeDropdownWidth(width: number): Promise<void> {

0 commit comments

Comments
 (0)