Improves handling of 'delete worktree' action on merge target when the default worktree is already open #4245
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#4232
When using the "delete worktree" action on the merge target hover, closes the current window and hands the rest of the flow over to the existing window with the default worktree, whenever it exists already.
To make this happen:
findCommonRepository
where we are passing a '.git' folder path into the lower-level rev-parse git ops, which ultimately results in an error from git (to repro in any terminal, navigate to the .git directory of a repo and trygit rev-parse --show-toplevel
. You will see afatal: this operation must be run in a work tree
error.)This carries a great deal of regression risk with deep links, so we should check for regressions where we can.
Closes #4232