Jesse Duffield
693048eb29
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-29 17:36:18 +10:00
Jesse Duffield
f8c18d074a
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-29 17:36:18 +10:00
Jesse Duffield
939c573907
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-29 17:36:18 +10:00
Jesse Duffield
71070827f2
Add worktree integration tests
2023-07-29 17:36:18 +10:00
Jesse Duffield
d764f35c5d
Fix unit tests
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
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
8f51c80d76
Show base ref suggestions when creating worktree
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
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
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
0776ae41d3
Land in the same panel when switching to a worktree
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
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
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
4a2c54e5d8
Update status to differentiate the main vs linked worktrees
2023-07-29 17:36:17 +10:00