diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index da1a1bc107b..34652fa9bff 100755 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -450,10 +450,7 @@ export class CommandCenter { return; } - const match = /git\s+clone\s+(.*)/.exec(url); - if (match) { - url = match[1]; - } + url = url.replace(/^\s*git\s+clone\s+/, ''); const config = workspace.getConfiguration('git'); let defaultCloneDirectory = config.get('defaultCloneDirectory') || os.homedir();