Merge branch 'master' into pr/108913

This commit is contained in:
João Moreno
2020-10-23 14:32:22 +02:00
428 changed files with 7022 additions and 3270 deletions

View File

@@ -472,8 +472,7 @@ export class CommandCenter {
}
}
@command('git.clone')
async clone(url?: string, parentPath?: string): Promise<void> {
async cloneRepository(url?: string, parentPath?: string, options: { recursive?: boolean } = {}): Promise<void> {
if (!url || typeof url !== 'string') {
url = await pickRemoteSource(this.model, {
providerLabel: provider => localize('clonefrom', "Clone from {0}", provider.name),
@@ -529,7 +528,7 @@ export class CommandCenter {
const repositoryPath = await window.withProgress(
opts,
(progress, token) => this.git.clone(url!, parentPath!, progress, token)
(progress, token) => this.git.clone(url!, { parentPath: parentPath!, progress, recursive: options.recursive }, token)
);
let message = localize('proposeopen', "Would you like to open the cloned repository?");
@@ -586,6 +585,16 @@ export class CommandCenter {
}
}
@command('git.clone')
async clone(url?: string, parentPath?: string): Promise<void> {
this.cloneRepository(url, parentPath);
}
@command('git.cloneRecursive')
async cloneRecursive(url?: string, parentPath?: string): Promise<void> {
this.cloneRepository(url, parentPath, { recursive: true });
}
@command('git.init')
async init(skipFolderPrompt = false): Promise<void> {
let repositoryPath: string | undefined = undefined;
@@ -2539,7 +2548,11 @@ export class CommandCenter {
@command('git.rebaseAbort', { repository: true })
async rebaseAbort(repository: Repository): Promise<void> {
await repository.rebaseAbort();
if (repository.rebaseCommit) {
await repository.rebaseAbort();
} else {
await window.showInformationMessage(localize('no rebase', "No rebase in progress."));
}
}
private createCommand(id: string, key: string, method: Function, options: CommandOptions): (...args: any[]) => any {