[WIP] Added support for -S for signing git commits

Ticket #5065
This commit is contained in:
Daniel Portella
2017-05-23 12:47:23 +01:00
parent 2ae81ab6ec
commit d266d9a994
4 changed files with 12 additions and 2 deletions

View File

@@ -612,7 +612,7 @@ export class Repository {
}
}
async commit(message: string, opts: { all?: boolean, amend?: boolean, signoff?: boolean } = Object.create(null)): Promise<void> {
async commit(message: string, opts: { all?: boolean, amend?: boolean, signoff?: boolean, signCommit?: boolean} = Object.create(null)): Promise<void> {
const args = ['commit', '--quiet', '--allow-empty-message', '--file', '-'];
if (opts.all) {
@@ -627,6 +627,10 @@ export class Repository {
args.push('--signoff');
}
if (opts.signCommit) {
args.push('-S');
}
try {
await this.run(args, { input: message || '' });
} catch (commitErr) {