MCPcopy Index your code
hub / github.com/isomorphic-git/isomorphic-git / commit

Function commit

src/api/commit.js:52–100  ·  view source on GitHub ↗
({
  fs: _fs,
  onSign,
  dir,
  gitdir = join(dir, '.git'),
  message,
  author,
  committer,
  signingKey,
  amend = false,
  dryRun = false,
  noUpdateBranch = false,
  ref,
  parent,
  tree,
  cache = {},
})

Source from the content-addressed store, hash-verified

50 *
51 */
52export async function commit({
53 fs: _fs,
54 onSign,
55 dir,
56 gitdir = join(dir, '.git'),
57 message,
58 author,
59 committer,
60 signingKey,
61 amend = false,
62 dryRun = false,
63 noUpdateBranch = false,
64 ref,
65 parent,
66 tree,
67 cache = {},
68}) {
69 try {
70 assertParameter('fs', _fs)
71 if (!amend) {
72 assertParameter('message', message)
73 }
74 if (signingKey) {
75 assertParameter('onSign', onSign)
76 }
77 const fs = new FileSystem(_fs)
78 const updatedGitdir = await discoverGitdir({ fsp: fs, dotgit: gitdir })
79
80 return await _commit({
81 fs,
82 cache,
83 onSign,
84 gitdir: updatedGitdir,
85 message,
86 author,
87 committer,
88 signingKey,
89 amend,
90 dryRun,
91 noUpdateBranch,
92 ref,
93 parent,
94 tree,
95 })
96 } catch (err) {
97 err.caller = 'git.commit'
98 throw err
99 }
100}

Calls 4

joinFunction · 0.90
assertParameterFunction · 0.90
discoverGitdirFunction · 0.90
_commitFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…