mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 09:08:48 +01:00
Merge commit 'refs/pull/65786/head' of github.com:Microsoft/vscode into pr/65786
This commit is contained in:
@@ -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> {
|
||||
|
||||
Vendored
+1
-1
@@ -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>;
|
||||
}
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user