diff --git a/extensions/git/src/repository.ts b/extensions/git/src/repository.ts index 3af93d30f17..3d21448beaa 100644 --- a/extensions/git/src/repository.ts +++ b/extensions/git/src/repository.ts @@ -1456,7 +1456,7 @@ export class Repository implements Disposable { }); } - closeDiffEditors(indexResources: string[] | undefined, workingTreeResources: string[] | undefined, ignoreSetting: boolean = false): void { + closeDiffEditors(indexResources: string[] | undefined, workingTreeResources: string[] | undefined, ignoreSetting = false): void { const config = workspace.getConfiguration('git', Uri.file(this.root)); if (!config.get('closeDiffOnOperation', false) && !ignoreSetting) { return; } @@ -1693,7 +1693,7 @@ export class Repository implements Disposable { await this.run(Operation.Push, () => this._push(remote, branch, undefined, undefined, forcePushMode)); } - async pushTo(remote?: string, name?: string, setUpstream: boolean = false, forcePushMode?: ForcePushMode): Promise { + async pushTo(remote?: string, name?: string, setUpstream = false, forcePushMode?: ForcePushMode): Promise { await this.run(Operation.Push, () => this._push(remote, name, setUpstream, undefined, forcePushMode)); } @@ -1983,7 +1983,7 @@ export class Repository implements Disposable { return ignored; } - private async _push(remote?: string, refspec?: string, setUpstream: boolean = false, followTags = false, forcePushMode?: ForcePushMode, tags = false): Promise { + private async _push(remote?: string, refspec?: string, setUpstream = false, followTags = false, forcePushMode?: ForcePushMode, tags = false): Promise { try { await this.repository.push(remote, refspec, setUpstream, followTags, forcePushMode, tags); } catch (err) { @@ -2524,7 +2524,7 @@ export class Repository implements Disposable { return true; } - public isBranchProtected(name: string = this.HEAD?.name ?? ''): boolean { + public isBranchProtected(name = this.HEAD?.name ?? ''): boolean { return this.isBranchProtectedMatcher ? this.isBranchProtectedMatcher(name) : false; }