1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-02-03 13:21:56 +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:
Jesse Duffield 2023-07-16 17:26:27 +10:00
parent 5868750aba
commit 6c69549ced

View File

@ -85,9 +85,5 @@ func (self *WorktreeHelper) Switch(worktree *models.Worktree, contextKey types.C
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)
}