Skip to content

Commit

Permalink
Git - switch back to using options instead of subcomands (#237390)
Browse files Browse the repository at this point in the history
  • Loading branch information
lszomoru authored Jan 7, 2025
1 parent bfb4f5f commit eab8316
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion extensions/git/src/git.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1168,7 +1168,7 @@ export class Repository {
}

async config(command: string, scope: string, key: string, value: any = null, options: SpawnOptions = {}): Promise<string> {
const args = ['config', command];
const args = ['config', `--${command}`];

if (scope) {
args.push(`--${scope}`);
Expand Down
2 changes: 1 addition & 1 deletion extensions/git/src/repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1088,7 +1088,7 @@ export class Repository implements Disposable {
}

setConfig(key: string, value: string): Promise<string> {
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<Commit[]> {
Expand Down

0 comments on commit eab8316

Please sign in to comment.