summaryrefslogtreecommitdiffstats
path: root/pkg/integration/tests/worktree
AgeCommit message (Collapse)Author
2023-07-30Fix flakey worktree testsJesse Duffield
In the presentation layer, when showing branches, we'll show worktrees against branches if they're associated. But there was a race condition: if the worktree model was refreshed after the branches model, it wouldn't be used in the presentation layer when it came time to render the branches. A better solution would be to have some way of signalling that a particular context needs to be refreshed and after all the models are done being refreshed, we then refresh the contexts. This will prevent double-renders
2023-07-30Fix bug where worktree view would take over window upon switching branchesJesse Duffield
When switching worktrees (which we can now do via the branch view) we re-layout the windows and their views. We had the worktree view ahead of the file view based on the Flatten() method in context.go, because it used to be associated with the branches panel.
2023-07-30Centralise logic for obtaining repo pathsJesse Duffield
There are quite a few paths you might want to get e.g. the repo's path, the worktree's path, the repo's git dir path, the worktree's git dir path. I want these all obtained once and then used when needed rather than having to have IO whenever we need them. This is not so much about reducing time spent on IO as it is about not having to care about errors every time we want a path.
2023-07-30Add test for opening lazygit in the worktree of a bare repoJesse Duffield
2023-07-30Update repo switch logicJesse Duffield
We now always re-use the state of the repo if we're returning to it, and we always reset the windows to their default tabs. We reset to default tabs because it's easy to implement. If people want to: * have tab states be retained when switching * have tab states specific to the current repo retained when switching back Then we'll need to revisit this
2023-07-30Add test for retained context focus when switching worktreesJesse Duffield
2023-07-30Support fastforwarding worktreeJesse Duffield
2023-07-30Add more worktree testsJesse Duffield
2023-07-30Add worktree tests for removing/detachingJesse Duffield
2023-07-30Add worktree integration testsJesse Duffield