diff --git a/extensions/git/src/git.ts b/extensions/git/src/git.ts index dcb3b4eb65f..327903aa959 100644 --- a/extensions/git/src/git.ts +++ b/extensions/git/src/git.ts @@ -1168,7 +1168,7 @@ export class Repository { } async config(command: string, scope: string, key: string, value: any = null, options: SpawnOptions = {}): Promise { - const args = ['config', command]; + const args = ['config', `--${command}`]; if (scope) { args.push(`--${scope}`); diff --git a/extensions/git/src/repository.ts b/extensions/git/src/repository.ts index e1b71d87f0a..28f9b70b3b3 100644 --- a/extensions/git/src/repository.ts +++ b/extensions/git/src/repository.ts @@ -1088,7 +1088,7 @@ export class Repository implements Disposable { } setConfig(key: string, value: string): Promise { - return this.run(Operation.Config(false), () => this.repository.config('set', 'local', key, value)); + return this.run(Operation.Config(false), () => this.repository.config('add', 'local', key, value)); } log(options?: LogOptions & { silent?: boolean }): Promise {