Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/microsoft/vscode.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLadislau Szomoru <3372902+lszomoru@users.noreply.github.com>2022-05-25 21:51:08 +0300
committerGitHub <noreply@github.com>2022-05-25 21:51:08 +0300
commit149e2b7674ba0888cbb7cf8bbd70f45db7393fa5 (patch)
tree63fa274efb35cde5fb26eeaf2730c92b0446e7a3 /extensions
parent8eeed3dd6c140da47b326d99e5a0579465c4f62e (diff)
Fix #149831 (#150276)
Diffstat (limited to 'extensions')
-rw-r--r--extensions/git/src/repository.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/extensions/git/src/repository.ts b/extensions/git/src/repository.ts
index e6bd193aa0c..c6fa51b5497 100644
--- a/extensions/git/src/repository.ts
+++ b/extensions/git/src/repository.ts
@@ -1408,15 +1408,15 @@ export class Repository implements Disposable {
}
@throttle
- async fetchAll(): Promise<void> {
- await this._fetch({ all: true });
+ async fetchAll(cancellationToken?: CancellationToken): Promise<void> {
+ await this._fetch({ all: true, cancellationToken });
}
async fetch(options: FetchOptions): Promise<void> {
await this._fetch(options);
}
- private async _fetch(options: { remote?: string; ref?: string; all?: boolean; prune?: boolean; depth?: number; silent?: boolean } = {}): Promise<void> {
+ private async _fetch(options: { remote?: string; ref?: string; all?: boolean; prune?: boolean; depth?: number; silent?: boolean; cancellationToken?: CancellationToken } = {}): Promise<void> {
if (!options.prune) {
const config = workspace.getConfiguration('git', Uri.file(this.root));
const prune = config.get<boolean>('pruneOnFetch');
@@ -1461,7 +1461,7 @@ export class Repository implements Disposable {
// When fetchOnPull is enabled, fetch all branches when pulling
if (fetchOnPull) {
- await this.repository.fetch({ all: true });
+ await this.fetchAll();
}
if (await this.checkIfMaybeRebased(this.HEAD?.name)) {
@@ -1532,7 +1532,7 @@ export class Repository implements Disposable {
const fn = async (cancellationToken?: CancellationToken) => {
// When fetchOnPull is enabled, fetch all branches when pulling
if (fetchOnPull) {
- await this.repository.fetch({ all: true, cancellationToken });
+ await this.fetchAll(cancellationToken);
}
if (await this.checkIfMaybeRebased(this.HEAD?.name)) {