mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 09:08:48 +01:00
fix default path bug related to branch prefix (#258709)
* fix default path bug related to branch prefix * remove branch prefix first, then get last component * replace / with - * clean up
This commit is contained in:
@@ -3455,10 +3455,9 @@ export class CommandCenter {
|
||||
commitish = choice.refName;
|
||||
}
|
||||
|
||||
|
||||
const worktreeName = (branch ?? commitish).startsWith(branchPrefix)
|
||||
? (branch ?? commitish).substring(branchPrefix.length)
|
||||
: (branch ?? commitish);
|
||||
const worktreeName = ((branch ?? commitish).startsWith(branchPrefix)
|
||||
? (branch ?? commitish).substring(branchPrefix.length).replace(/\//g, '-')
|
||||
: (branch ?? commitish).replace(/\//g, '-'));
|
||||
|
||||
// If user selects folder button, they manually select the worktree path through folder picker
|
||||
const getWorktreePath = async (): Promise<string | undefined> => {
|
||||
|
||||
Reference in New Issue
Block a user