Merge commit 'refs/pull/65786/head' of github.com:Microsoft/vscode into pr/65786

This commit is contained in:
Joao Moreno
2019-01-07 11:15:18 +01:00
4 changed files with 10 additions and 7 deletions
+2 -2
View File
@@ -168,8 +168,8 @@ export class ApiRepository implements Repository {
return this._repository.removeRemote(name);
}
fetch(remote?: string | undefined, ref?: string | undefined): Promise<void> {
return this._repository.fetch(remote, ref);
fetch(remote?: string | undefined, ref?: string | undefined, depth?: number | undefined): Promise<void> {
return this._repository.fetch(remote, ref, depth);
}
pull(): Promise<void> {
+1 -1
View File
@@ -153,7 +153,7 @@ export interface Repository {
addRemote(name: string, url: string): Promise<void>;
removeRemote(name: string): Promise<void>;
fetch(remote?: string, ref?: string): Promise<void>;
fetch(remote?: string, ref?: string, depth?: number): Promise<void>;
pull(): Promise<void>;
push(remoteName?: string, branchName?: string, setUpstream?: boolean): Promise<void>;
}
+5 -2
View File
@@ -1166,7 +1166,7 @@ export class Repository {
await this.run(args);
}
async fetch(options: { remote?: string, ref?: string, all?: boolean, prune?: boolean } = {}): Promise<void> {
async fetch(options: { remote?: string, ref?: string, all?: boolean, prune?: boolean, depth?: number } = {}): Promise<void> {
const args = ['fetch'];
if (options.remote) {
@@ -1183,6 +1183,9 @@ export class Repository {
args.push('--prune');
}
if (options.depth) {
args.push(`--depth=${options.depth}`);
}
try {
await this.run(args);
@@ -1198,7 +1201,7 @@ export class Repository {
}
async pull(rebase?: boolean, remote?: string, branch?: string): Promise<void> {
const args = ['pull', '--tags'];
const args = ['pull', '--tags', '--unshallow'];
if (rebase) {
args.push('-r');
+2 -2
View File
@@ -933,8 +933,8 @@ export class Repository implements Disposable {
await this.run(Operation.Fetch, () => this.repository.fetch({ all: true }));
}
async fetch(remote?: string, ref?: string): Promise<void> {
await this.run(Operation.Fetch, () => this.repository.fetch({ remote, ref }));
async fetch(remote?: string, ref?: string, depth?: number): Promise<void> {
await this.run(Operation.Fetch, () => this.repository.fetch({ remote, ref, depth }));
}
@throttle