mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-26 03:29:00 +01:00
Error handling of create worktree and fix create worktree... command from command palette (#257172)
* esc when creating worktree name cancels create operation * Find main repo for createworktree command palette to prevent repo picker * error handling of creating worktree * add back repo picker for create worktree... command
This commit is contained in:
@@ -351,6 +351,8 @@ function getGitErrorCode(stderr: string): string | undefined {
|
||||
return GitErrorCodes.NotASafeGitRepository;
|
||||
} else if (/contains modified or untracked files|use --force to delete it/.test(stderr)) {
|
||||
return GitErrorCodes.WorktreeContainsChanges;
|
||||
} else if (/is already used by worktree at|already exists/.test(stderr)) {
|
||||
return GitErrorCodes.WorktreeAlreadyExists;
|
||||
}
|
||||
|
||||
return undefined;
|
||||
|
||||
Reference in New Issue
Block a user