Jesse Duffield
06be88aef7
Use fields rather than methods on worktrees
...
I would prefer to use methods to keep things immutable but I'd rather be consistent with the other
models and update them all at once
2023-07-30 18:35:24 +10:00
Jesse Duffield
de57cfd6ff
Remove IO logic from presentation code for worktrees
...
We're doing all the IO in our workers loader method so that we don't need to do any
in our presentation code
2023-07-30 18:35:24 +10:00
Jesse Duffield
ae66f720f5
Update repo switch logic
...
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-30 18:35:23 +10:00
Jesse Duffield
277142fc4b
Add worktree integration tests
2023-07-30 18:35:23 +10:00
Jesse Duffield
fb4453c18a
Fix unit tests
2023-07-30 18:35:23 +10:00
Jesse Duffield
a06a5cadee
Only show worktree in status panel if not the main worktree and worktrees are supported
2023-07-30 18:35:22 +10:00
Jesse Duffield
6f2f9f6677
Assume that the base of a worktree can be checked out
2023-07-30 18:35:22 +10:00
Jesse Duffield
2082fdf84a
i18n for worktrees
2023-07-30 18:35:22 +10:00
Jesse Duffield
894485190b
Don't quit on error
2023-07-30 18:35:22 +10:00
Jesse Duffield
2e68967e02
Show base ref suggestions when creating worktree
2023-07-30 18:35:22 +10:00
Jesse Duffield
9c69a5df69
Checkout worktree when creating from worktree view
2023-07-30 18:35:22 +10:00
Jesse Duffield
18ea68c23a
Support creating worktrees from refs
2023-07-30 18:35:22 +10:00
Jesse Duffield
4b2622d93b
Fix wording
2023-07-30 18:35:22 +10:00
Jesse Duffield
ae0193698e
Log when directory is changed
2023-07-30 18:35:22 +10:00
Jesse Duffield
6b4a638415
Handle deleting branch attached to worktree
2023-07-30 18:35:22 +10:00
Jesse Duffield
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
Jesse Duffield
ab3052f642
Land in the same panel when switching to a worktree
2023-07-30 18:35:22 +10:00
Jesse Duffield
077ae99438
Prompt to switch to worktree when branch is checked out by other worktree
2023-07-30 18:35:22 +10:00
Jesse Duffield
fe8adf9eb8
Use git lingo
2023-07-30 18:35:22 +10:00
Jesse Duffield
c713d550c0
Improve name handling
2023-07-30 18:35:22 +10:00
Joel Baranick
db02c13bf6
Address PR comments
2023-07-30 18:35:21 +10:00
Joel Baranick
1ce9a87544
Basic support for adding a worktree
2023-07-30 18:35:21 +10:00
Joel Baranick
c679fd1924
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-30 18:35:21 +10:00
Joel Baranick
60872c91e6
Update status to differentiate the main vs linked worktrees
2023-07-30 18:35:21 +10:00