mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 12:04:04 +01:00
Add worktree command (#255945)
* Basic functionality of adding worktree * Code refactoring and clean up * Remove accidentally added submodules * Specify folder destination * Remove default worktree path, always prompt for destination instead * create worktree only displayed in repo's worktree subcommands * Git - handle another error condition when detecting worktrees (#256278) * Rework creating worktree flow * Include worktree name placeholder --------- Co-authored-by: Ladislau Szomoru <3372902+lszomoru@users.noreply.github.com>
This commit is contained in:
@@ -2033,6 +2033,11 @@ export class Repository {
|
||||
await this.exec(args);
|
||||
}
|
||||
|
||||
async worktree(options: { path: string; name: string }): Promise<void> {
|
||||
const args = ['worktree', 'add', options.path, options.name];
|
||||
await this.exec(args);
|
||||
}
|
||||
|
||||
async deleteWorktree(path: string): Promise<void> {
|
||||
const args = ['worktree', 'remove', path];
|
||||
await this.exec(args);
|
||||
|
||||
Reference in New Issue
Block a user