diff --git a/extensions/git/src/api/api1.ts b/extensions/git/src/api/api1.ts index e559c0cb807..4090efa9551 100644 --- a/extensions/git/src/api/api1.ts +++ b/extensions/git/src/api/api1.ts @@ -112,6 +112,10 @@ export class ApiRepository implements Repository { return this.#repository.setConfig(key, value); } + unsetConfig(key: string): Promise { + return this.#repository.unsetConfig(key); + } + getGlobalConfig(key: string): Promise { return this.#repository.getGlobalConfig(key); } diff --git a/extensions/git/src/api/git.d.ts b/extensions/git/src/api/git.d.ts index 851d5734977..ea78ac4d99a 100644 --- a/extensions/git/src/api/git.d.ts +++ b/extensions/git/src/api/git.d.ts @@ -204,6 +204,7 @@ export interface Repository { getConfigs(): Promise<{ key: string; value: string; }[]>; getConfig(key: string): Promise; setConfig(key: string, value: string): Promise; + unsetConfig(key: string): Promise; getGlobalConfig(key: string): Promise; getObjectDetails(treeish: string, path: string): Promise<{ mode: string, object: string, size: number }>; diff --git a/extensions/git/src/repository.ts b/extensions/git/src/repository.ts index 28f9b70b3b3..2a722502b75 100644 --- a/extensions/git/src/repository.ts +++ b/extensions/git/src/repository.ts @@ -1091,6 +1091,10 @@ export class Repository implements Disposable { return this.run(Operation.Config(false), () => this.repository.config('add', 'local', key, value)); } + unsetConfig(key: string): Promise { + return this.run(Operation.Config(false), () => this.repository.config('unset', 'local', key)); + } + log(options?: LogOptions & { silent?: boolean }): Promise { const showProgress = !options || options.silent !== true; return this.run(Operation.Log(showProgress), () => this.repository.log(options));