mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-06-20 01:19:23 +02:00
Don't touch repo stack when switching worktrees
We shouldn't touch this cos we're doing a lateral move
This commit is contained in:
@@ -85,9 +85,5 @@ func (self *WorktreeHelper) Switch(worktree *models.Worktree, contextKey types.C
|
|||||||
|
|
||||||
self.c.LogAction(self.c.Tr.SwitchToWorktree)
|
self.c.LogAction(self.c.Tr.SwitchToWorktree)
|
||||||
|
|
||||||
// if we were in a submodule, we want to forget about that stack of repos
|
|
||||||
// so that hitting escape in the new repo does nothing
|
|
||||||
self.c.State().GetRepoPathStack().Clear()
|
|
||||||
|
|
||||||
return self.reposHelper.DispatchSwitchTo(worktree.Path, true, self.c.Tr.ErrWorktreeMovedOrRemoved, contextKey)
|
return self.reposHelper.DispatchSwitchTo(worktree.Path, true, self.c.Tr.ErrWorktreeMovedOrRemoved, contextKey)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user