1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-08-07 22:02:56 +03:00

Add more worktree tests

This commit is contained in:
Jesse Duffield
2023-07-24 16:36:11 +10:00
parent b93b9dae88
commit a313b16704
12 changed files with 325 additions and 30 deletions

View File

@@ -475,7 +475,10 @@ func (self *BranchesController) rename(branch *models.Branch) error {
}
// need to find where the branch is now so that we can re-select it. That means we need to refetch the branches synchronously and then find our branch
_ = self.c.Refresh(types.RefreshOptions{Mode: types.SYNC, Scope: []types.RefreshableView{types.BRANCHES}})
_ = self.c.Refresh(types.RefreshOptions{
Mode: types.SYNC,
Scope: []types.RefreshableView{types.BRANCHES, types.WORKTREES},
})
// now that we've got our stuff again we need to find that branch and reselect it.
for i, newBranch := range self.c.Model().Branches {