Follow up on #1109 #1146
I think #1146 has a bug where it won't work if there are multiple git repos in the parent dir (in my case ~/git).
Since wt has a good guess for the main repo location from its own configuration worktree-path, I think wt could try that route before giving up.
Also the UX is a bit off, I think it should only recommend wt switch ^ if it's resolvable.
[dave@scgtaranaki] [02/22/26 17:03:56.590] [🐏 84%] [~/git/accounting-rs.data] []
❯ wt switch
✗ fatal: Unable to read current working directory: No such file or directory
↳ Current directory was removed. Try: wt switch ^
[dave@scgtaranaki] [02/22/26 17:03:59.867] [🐏 84%] [~/git/accounting-rs.data] []
❯ wt switch ^
✗ Failed to switch worktree
fatal: Unable to read current working directory: No such file or directory
↳ Current directory was removed. Try: wt switch ^
[dave@scgtaranaki] [02/22/26 17:04:05.106] [🐏 84%] [~/git/accounting-rs.data] []
❯ wt switch main
✗ Failed to switch worktree
fatal: Unable to read current working directory: No such file or directory
↳ Current directory was removed. Try: wt switch ^
I had CC take a regex approach to reverse engineer using worktree-path with a fair amount of success for minimal effort if that route has any interest to you.
Follow up on #1109 #1146
I think #1146 has a bug where it won't work if there are multiple git repos in the parent dir (in my case
~/git).Since wt has a good guess for the main repo location from its own configuration
worktree-path, I think wt could try that route before giving up.Also the UX is a bit off, I think it should only recommend
wt switch ^if it's resolvable.I had CC take a regex approach to reverse engineer using
worktree-pathwith a fair amount of success for minimal effort if that route has any interest to you.