Skip to content

Commit

Permalink
fix: commit input box now knows which repository to use
Browse files Browse the repository at this point in the history
  • Loading branch information
senyai committed Jul 22, 2024
1 parent 5b610cb commit 45bc292
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,7 @@ export class Repository implements IDisposable, InteractionAPI {
this._sourceControl.acceptInputCommand = {
command: 'fossil.commitWithInput',
title: localize('commit', 'Commit'),
arguments: [this satisfies Repository],
};
this._sourceControl.quickDiffProvider = this;

Expand Down
8 changes: 8 additions & 0 deletions src/test/suite/utilitiesSuite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,4 +209,12 @@ export function utilitiesSuite(this: Suite): void {
sinon.assert.calledOnce(createTerminalstub);
sinon.assert.calledOnceWithExactly(sendText, 'fossil ui');
});
test('Commit input box knows which repository to use', () => {
const repository = getRepository();
assert.deepStrictEqual(repository.sourceControl.acceptInputCommand, {
command: 'fossil.commitWithInput',
title: 'Commit',
arguments: [repository],
});
});
}

0 comments on commit 45bc292

Please sign in to comment.