提交 eb43c80e 编写于 作者: J Joao Moreno

💄

上级 bf741a1a
......@@ -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 })
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册