Commit 15fc51c
authored
fix(MORG-48): skip checkout when deleting a merged worktree branch (#38)
* fix(MORG-48): skip checkout when deleting a worktree branch
When a branch with a worktree is being deleted during sync and the user
is on that branch, git checkout main would fail because main is already
checked out in the main worktree. The checkout is unnecessary anyway since
removeWorktree handles cleanup — skip it and only checkout for regular
(non-worktree) branches.
* fix(MORG-48): use signalWorktreeCd when deleting current worktree branch
When the user is in a worktree and its branch gets deleted during sync,
use signalWorktreeCd to move the shell to the main worktree root — with
the shell wrapper this is automatic; without it a cd hint is printed.1 parent aabcae3 commit 15fc51c
1 file changed
Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| 17 | + | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
| |||
108 | 110 | | |
109 | 111 | | |
110 | 112 | | |
111 | | - | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
112 | 121 | | |
113 | 122 | | |
114 | 123 | | |
| |||
0 commit comments