From 6c69549ced9286517fa53530049318123c6ed781 Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Sun, 16 Jul 2023 17:26:27 +1000 Subject: [PATCH] Don't touch repo stack when switching worktrees We shouldn't touch this cos we're doing a lateral move --- pkg/gui/controllers/helpers/worktree_helper.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pkg/gui/controllers/helpers/worktree_helper.go b/pkg/gui/controllers/helpers/worktree_helper.go index b43fb7d69..0dce60d60 100644 --- a/pkg/gui/controllers/helpers/worktree_helper.go +++ b/pkg/gui/controllers/helpers/worktree_helper.go @@ -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) }