💄 commit empty

This commit is contained in:
Joao Moreno
2018-09-12 15:46:40 +02:00
parent e2b2b5bc9d
commit 9b0eee12d3
5 changed files with 43 additions and 34 deletions

View File

@@ -623,6 +623,14 @@ export function parseLsFiles(raw: string): LsFilesElement[] {
.map(([, mode, object, stage, file]) => ({ mode, object, stage, file }));
}
export interface CommitOptions {
all?: boolean;
amend?: boolean;
signoff?: boolean;
signCommit?: boolean;
empty?: boolean;
}
export class Repository {
constructor(
@@ -940,7 +948,7 @@ export class Repository {
}
}
async commit(message: string, opts: { all?: boolean, amend?: boolean, signoff?: boolean, signCommit?: boolean } = Object.create(null)): Promise<void> {
async commit(message: string, opts: CommitOptions = Object.create(null)): Promise<void> {
const args = ['commit', '--quiet', '--allow-empty-message', '--file', '-'];
if (opts.all) {