Jesse Duffield
fb73bb7e25
Update cheatsheets
2023-07-29 17:36:18 +10:00
Jesse Duffield
e782b77475
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-29 17:36:18 +10:00
Jesse Duffield
d764f35c5d
Fix unit tests
2023-07-29 17:36:18 +10:00
Jesse Duffield
b06f938e00
Show loader when switching worktrees
2023-07-29 17:36:18 +10:00
Jesse Duffield
ca0b966f44
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-29 17:36:18 +10:00
Jesse Duffield
514c2f0897
Fix tests
...
Going and fixing up some submodule tests which were broken by bad assumptions with worktree code
2023-07-29 17:36:18 +10:00
Jesse Duffield
cef0186b7d
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-29 17:36:18 +10:00
Jesse Duffield
af5ec473f3
Safer fetching of linked worktree paths
2023-07-29 17:36:18 +10:00
Jesse Duffield
faa3a612eb
Move worktrees tab to files window
2023-07-29 17:36:18 +10:00
Jesse Duffield
47717802f8
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-29 17:36:18 +10:00
Jesse Duffield
b79d19e0a7
Support opening worktree in editor
2023-07-29 17:36:18 +10:00
Jesse Duffield
0cef35324f
Properly render worktrees in files panel
2023-07-29 17:36:18 +10:00
Jesse Duffield
1638354474
Better logic for knowing which repo we're in
2023-07-29 17:36:18 +10:00
Jesse Duffield
96e41fa985
Only show worktree in status panel if not the main worktree and worktrees are supported
2023-07-29 17:36:18 +10:00
Jesse Duffield
4c1d706a85
Hide worktree functionality on old git versions
2023-07-29 17:36:18 +10:00
Jesse Duffield
b6d5542b35
Associate branches with worktrees even when mid-rebase
2023-07-29 17:36:18 +10:00
Jesse Duffield
72d7b91640
Assume that the base of a worktree can be checked out
2023-07-29 17:36:18 +10:00
Jesse Duffield
32ceeaa43f
i18n for worktrees
2023-07-29 17:36:18 +10:00
Jesse Duffield
82da8d7586
Don't quit on error
2023-07-29 17:36:17 +10:00
Jesse Duffield
096b8a19c5
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-29 17:36:17 +10:00
Jesse Duffield
8f51c80d76
Show base ref suggestions when creating worktree
2023-07-29 17:36:17 +10:00
Jesse Duffield
33fc54d6e2
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-29 17:36:17 +10:00
Jesse Duffield
c8dcd002e2
Checkout worktree when creating from worktree view
2023-07-29 17:36:17 +10:00
Jesse Duffield
49b8806cc4
Use 'M' for months in branches panel
2023-07-29 17:36:17 +10:00
Jesse Duffield
e2cef55f94
Fix filtering logic in worktrees view
2023-07-29 17:36:17 +10:00
Jesse Duffield
500c0eafb9
Support creating worktrees from refs
2023-07-29 17:36:17 +10:00
Jesse Duffield
e0c8a56db5
Fix wording
2023-07-29 17:36:17 +10:00
Jesse Duffield
002e4eedf5
Log when directory is changed
2023-07-29 17:36:17 +10:00
Jesse Duffield
a991525391
Handle deleting branch attached to worktree
2023-07-29 17:36:17 +10:00
Jesse Duffield
7be3658533
Update wording
2023-07-29 17:36:17 +10:00
Jesse Duffield
fd854fb7f7
Don't touch repo stack when switching worktrees
...
We shouldn't touch this cos we're doing a lateral move
2023-07-29 17:36:17 +10:00
Jesse Duffield
64711dfc2f
Move status panel presentation logic into presentation package
2023-07-29 17:36:17 +10:00
Jesse Duffield
0776ae41d3
Land in the same panel when switching to a worktree
2023-07-29 17:36:17 +10:00
Jesse Duffield
ad017f3bb8
Move current worktree to top of list
2023-07-29 17:36:17 +10:00
Jesse Duffield
9eb9ce88b3
Prompt to switch to worktree when branch is checked out by other worktree
2023-07-29 17:36:17 +10:00
Jesse Duffield
7af9715a1b
Use git lingo
2023-07-29 17:36:17 +10:00
Jesse Duffield
dbd32f63dd
Improve name handling
2023-07-29 17:36:17 +10:00
Jesse Duffield
d7aca1bcbd
Use sentence case
2023-07-29 17:36:17 +10:00
Jesse Duffield
72c856ac13
Refactor
2023-07-29 17:36:17 +10:00
Jesse Duffield
038de926b3
Update worktree model
2023-07-29 17:36:17 +10:00
Jesse Duffield
4c471dff83
Alert when attempting to enter the current worktree
2023-07-29 17:36:17 +10:00
Jesse Duffield
c1ea17b66f
Remove comment
2023-07-29 17:36:17 +10:00
Joel Baranick
b22f936522
Address PR comments
2023-07-29 17:36:17 +10:00
Joel Baranick
53e408f156
Basic support for adding a worktree
2023-07-29 17:36:17 +10:00
Joel Baranick
46bb9bb60b
Put all worktree i18n strings together
...
Use tabwriter to align worktree panel contents
2023-07-29 17:36:17 +10:00
Joel Baranick
b10670ba44
Improve worktree panel
2023-07-29 17:36:17 +10:00
Joel Baranick
f13f85de8e
Style missing worktree as red and display better error when trying to switch to them
...
Use a broken link icon for missing worktrees
2023-07-29 17:36:17 +10:00
Joel Baranick
141011aaae
Hide worktrees in the worktree panel if they point at a non-existing filesystem location.
...
Remove unneeded check when filtering out branches from non-current worktrees from the branch panel.
Add link icon for linked worktrees
2023-07-29 17:36:17 +10:00
Joel Baranick
4a2c54e5d8
Update status to differentiate the main vs linked worktrees
2023-07-29 17:36:17 +10:00
Joel Baranick
2f156b3438
Support for deleting a worktree
2023-07-29 17:36:17 +10:00