MCPcopy Create free account
hub / github.com/steveukx/git-js / commitTask

Function commitTask

simple-git/src/lib/tasks/commit.ts:17–36  ·  view source on GitHub ↗
(
   message: string[],
   files: string[],
   customArgs: string[]
)

Source from the content-addressed store, hash-verified

15import { configurationErrorTask } from './task';
16
17export function commitTask(
18 message: string[],
19 files: string[],
20 customArgs: string[]
21): StringTask<CommitResult> {
22 const commands: string[] = [
23 '-c',
24 'core.abbrev=40',
25 'commit',
26 ...prefixedArray(message, '-m'),
27 ...files,
28 ...customArgs,
29 ];
30
31 return {
32 commands,
33 format: 'utf-8',
34 parser: parseCommitResult,
35 };
36}
37
38export default function (): Pick<SimpleGit, 'commit'> {
39 return {

Callers 1

commitFunction · 0.85

Calls 1

prefixedArrayFunction · 0.90

Tested by

no test coverage detected