1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-15 00:15:32 +02:00
Commit Graph

4219 Commits

Author SHA1 Message Date
9c15ba0c0b Add test for retained context focus when switching worktrees 2023-07-30 18:35:23 +10:00
b3060065d9 Support fastforwarding worktree 2023-07-30 18:35:23 +10:00
a313b16704 Add more worktree tests 2023-07-30 18:35:23 +10:00
b93b9dae88 Add worktree tests for removing/detaching 2023-07-30 18:35:23 +10:00
277142fc4b Add worktree integration tests 2023-07-30 18:35:23 +10:00
18a508b29c Update cheatsheets 2023-07-30 18:35:23 +10:00
cdfad864ae Remove worktree version guards
Our min required git version is 2.20 so there's no need to add guards
for worktrees because they were added in 2.5
2023-07-30 18:35:23 +10:00
fb4453c18a Fix unit tests 2023-07-30 18:35:23 +10:00
b5ff55e538 Show loader when switching worktrees 2023-07-30 18:35:23 +10:00
81a9133261 Support older versions of git when fetching worktrees
Older versions of git don't support the -z flag in `git worktree list`.
So we're using newlines.

Also, we're not raising an error upon error because that triggers another refresh,
which gets us into an infinite loop
2023-07-30 18:35:23 +10:00
ca6f9c4155 Fix tests
Going and fixing up some submodule tests which were broken by bad assumptions with worktree code
2023-07-30 18:35:23 +10:00
7569180cac Fix tests
We now change directories to the repo on startup so we don't need to determine the test path in some special way
2023-07-30 18:35:23 +10:00
eeec373728 Safer fetching of linked worktree paths 2023-07-30 18:35:23 +10:00
0604e43813 Move worktrees tab to files window 2023-07-30 18:35:23 +10:00
27ade502ee Change directory to worktree if given as an argument
Previously we used an env var for this and it's not clear to me how that worked but
with this PR current directory = worktree directory
2023-07-30 18:35:23 +10:00
3a7468ecac Support opening worktree in editor 2023-07-30 18:35:23 +10:00
7b05dacb98 Properly render worktrees in files panel 2023-07-30 18:35:22 +10:00
b73efb2c22 Better logic for knowing which repo we're in 2023-07-30 18:35:22 +10:00
a06a5cadee Only show worktree in status panel if not the main worktree and worktrees are supported 2023-07-30 18:35:22 +10:00
3cd2d6fa5c Hide worktree functionality on old git versions 2023-07-30 18:35:22 +10:00
ec839e9e96 Associate branches with worktrees even when mid-rebase 2023-07-30 18:35:22 +10:00
6f2f9f6677 Assume that the base of a worktree can be checked out 2023-07-30 18:35:22 +10:00
2082fdf84a i18n for worktrees 2023-07-30 18:35:22 +10:00
894485190b Don't quit on error 2023-07-30 18:35:22 +10:00
87b2455dbb Allow opening worktree in editor
This does the job but I think we need yet another editor command for opening a directory in a new window.
2023-07-30 18:35:22 +10:00
2e68967e02 Show base ref suggestions when creating worktree 2023-07-30 18:35:22 +10:00
71422a8549 Refresh work trees when discarding file changes
We do this because we may be deleting a worktree folder so we'll need to show that in the worktrees view
2023-07-30 18:35:22 +10:00
9c69a5df69 Checkout worktree when creating from worktree view 2023-07-30 18:35:22 +10:00
9b24995990 Use 'M' for months in branches panel 2023-07-30 18:35:22 +10:00
142f06357f Fix filtering logic in worktrees view 2023-07-30 18:35:22 +10:00
18ea68c23a Support creating worktrees from refs 2023-07-30 18:35:22 +10:00
4b2622d93b Fix wording 2023-07-30 18:35:22 +10:00
ae0193698e Log when directory is changed 2023-07-30 18:35:22 +10:00
6b4a638415 Handle deleting branch attached to worktree 2023-07-30 18:35:22 +10:00
4b3c9f5b35 Update wording 2023-07-30 18:35:22 +10:00
6c69549ced Don't touch repo stack when switching worktrees
We shouldn't touch this cos we're doing a lateral move
2023-07-30 18:35:22 +10:00
5868750aba Move status panel presentation logic into presentation package 2023-07-30 18:35:22 +10:00
ab3052f642 Land in the same panel when switching to a worktree 2023-07-30 18:35:22 +10:00
53f4ccb809 Move current worktree to top of list 2023-07-30 18:35:22 +10:00
077ae99438 Prompt to switch to worktree when branch is checked out by other worktree 2023-07-30 18:35:22 +10:00
fe8adf9eb8 Use git lingo 2023-07-30 18:35:22 +10:00
c713d550c0 Improve name handling 2023-07-30 18:35:22 +10:00
d19d89ea9d Use sentence case 2023-07-30 18:35:22 +10:00
e8ec41fb0f Refactor 2023-07-30 18:35:22 +10:00
7682ec029b Update worktree model 2023-07-30 18:35:22 +10:00
03f726038e Alert when attempting to enter the current worktree 2023-07-30 18:35:21 +10:00
796945aad0 Remove comment 2023-07-30 18:35:21 +10:00
db02c13bf6 Address PR comments 2023-07-30 18:35:21 +10:00
1ce9a87544 Basic support for adding a worktree 2023-07-30 18:35:21 +10:00
35e6e6347a Put all worktree i18n strings together
Use tabwriter to align worktree panel contents
2023-07-30 18:35:21 +10:00