Handler for the `git commit` command.
(rawArgs: string[])
| 124 | |
| 125 | /** Handler for the `git commit` command. */ |
| 126 | private _commit(rawArgs: string[]) { |
| 127 | const {message, files} = yargs(rawArgs) |
| 128 | .command('$0 [files..]', false) |
| 129 | .option('message', {string: true, alias: 'm'}) |
| 130 | .positional('files', {array: true, demandOption: true, type: 'string'}) |
| 131 | .parseSync(); |
| 132 | if (!message) { |
| 133 | throw Error('No commit message has been specified.'); |
| 134 | } |
| 135 | this.head.newCommits.push({message, files}); |
| 136 | } |
| 137 | |
| 138 | /** Handler for the `git fetch` command. */ |
| 139 | private _fetch(rawArgs: string[]) { |