You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add worktree removal option when deleting PR branches (#8559)
* Initial plan
* Initial plan for worktree deletion support
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
* Add worktree deletion support when deleting PR branches
- Add SELECT_WORKTREE constant in settingKeys.ts
- Add githubPullRequests.defaultDeletionMethod.selectWorktree setting in package.json
- Add NLS description in package.nls.json
- Add getWorktreeForBranch() and removeWorktree() methods to FolderRepositoryManager
- Add worktree option to SelectedAction type and quick pick dropdown
- Add worktree deletion to auto-delete flow (autoDeleteBranchesAfterMerge)
- Ensure worktree removal happens before branch deletion in performBranchDeletion
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
* Address code review: static imports, error handling, documentation
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
* Fix webworker build: move child_process usage to env/node module
Move git worktree operations (child_process/util) into dedicated
env/node/gitWorktree.ts and env/browser/gitWorktree.ts modules,
following the existing env pattern. The webpack alias ensures the
browser/no-op version is used for the webworker target.
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
* Update git API
* refactor: use git API for worktree operations instead of child_process
- Use repository.state.worktrees to find worktrees for a branch
- Use repository.deleteWorktree() to remove worktrees
- Add Worktree interface to api.d.ts
- Remove env/node/gitWorktree.ts and env/browser/gitWorktree.ts
- Remove webpack alias for gitWorktree
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
* Skip worktree deletion when worktree is a workspace folder
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
* Hide worktree delete option when worktree is a workspace folder
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
* Use isDescendant for cross-platform path comparison in worktree workspace check
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
* Remove unused top-level isWorktreeInWorkspace function to fix lint error
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
* Use case-insensitive path comparison for isWorktreeInWorkspace on Windows
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
* Fix worktree/workspace path compare
* Fix error
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Copy file name to clipboardExpand all lines: package.nls.json
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -44,6 +44,7 @@
44
44
"githubPullRequests.fileAutoReveal.description": "Automatically reveal open files in the pull request changes tree.",
45
45
"githubPullRequests.defaultDeletionMethod.selectLocalBranch.description": "When true, the option to delete the local branch will be selected by default when deleting a branch from a pull request.",
46
46
"githubPullRequests.defaultDeletionMethod.selectRemote.description": "When true, the option to delete the remote will be selected by default when deleting a branch from a pull request.",
47
+
"githubPullRequests.defaultDeletionMethod.selectWorktree.description": "When true, the option to remove the associated worktree will be selected by default when deleting a branch from a pull request.",
47
48
"githubPullRequests.deleteBranchAfterMerge.description": "Automatically delete the branch after merging a pull request. This setting only applies when the pull request is merged through this extension. When using merge queues, this will only delete the local branch.",
48
49
"githubPullRequests.terminalLinksHandler.description": "Default handler for terminal links.",
49
50
"githubPullRequests.terminalLinksHandler.github": "Create the pull request on GitHub.",
0 commit comments