mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 03:54:24 +01:00
💄
This commit is contained in:
@@ -328,10 +328,6 @@ export class CommandCenter {
|
||||
return '';
|
||||
}
|
||||
|
||||
private handlePathTilde(path: string): string {
|
||||
return path.replace(/^~/, os.homedir());
|
||||
}
|
||||
|
||||
private static cloneId = 0;
|
||||
|
||||
@command('git.clone')
|
||||
@@ -358,7 +354,7 @@ export class CommandCenter {
|
||||
|
||||
const parentPath = await window.showInputBox({
|
||||
prompt: localize('parent', "Parent Directory"),
|
||||
value: this.handlePathTilde(value),
|
||||
value,
|
||||
ignoreFocusOut: true
|
||||
});
|
||||
|
||||
@@ -382,7 +378,7 @@ export class CommandCenter {
|
||||
statusBarItem.command = cancelCommandId;
|
||||
statusBarItem.show();
|
||||
|
||||
const clonePromise = this.git.clone(url, this.handlePathTilde(parentPath), tokenSource.token);
|
||||
const clonePromise = this.git.clone(url, parentPath.replace(/^~/, os.homedir()), tokenSource.token);
|
||||
|
||||
try {
|
||||
window.withProgress({ location: ProgressLocation.SourceControl, title: localize('cloning', "Cloning git repository...") }, () => clonePromise);
|
||||
@@ -1329,7 +1325,7 @@ export class CommandCenter {
|
||||
|
||||
const remoteRefs = repository.refs;
|
||||
const remoteRefsFiltered = remoteRefs.filter(r => (r.remote === remotePick.label));
|
||||
const branchPicks = remoteRefsFiltered.map(r => ({ label: r.name})) as {label : string; description : string}[];
|
||||
const branchPicks = remoteRefsFiltered.map(r => ({ label: r.name })) as { label: string; description: string }[];
|
||||
const branchPick = await window.showQuickPick(branchPicks, { placeHolder });
|
||||
|
||||
if (!branchPick) {
|
||||
@@ -1338,7 +1334,7 @@ export class CommandCenter {
|
||||
|
||||
const remoteCharCnt = remotePick.label.length;
|
||||
|
||||
repository.pull(false, remotePick.label, branchPick.label.slice(remoteCharCnt+1));
|
||||
repository.pull(false, remotePick.label, branchPick.label.slice(remoteCharCnt + 1));
|
||||
}
|
||||
|
||||
@command('git.pull', { repository: true })
|
||||
|
||||
Reference in New Issue
Block a user