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

Function readCommit

src/api/readCommit.js:32–56  ·  view source on GitHub ↗
({
  fs,
  dir,
  gitdir = join(dir, '.git'),
  oid,
  cache = {},
})

Source from the content-addressed store, hash-verified

30 *
31 */
32export async function readCommit({
33 fs,
34 dir,
35 gitdir = join(dir, '.git'),
36 oid,
37 cache = {},
38}) {
39 try {
40 assertParameter('fs', fs)
41 assertParameter('gitdir', gitdir)
42 assertParameter('oid', oid)
43
44 const fsp = new FileSystem(fs)
45 const updatedGitdir = await discoverGitdir({ fsp, dotgit: gitdir })
46 return await _readCommit({
47 fs: fsp,
48 cache,
49 gitdir: updatedGitdir,
50 oid,
51 })
52 } catch (err) {
53 err.caller = 'git.readCommit'
54 throw err
55 }
56}

Calls 4

joinFunction · 0.90
assertParameterFunction · 0.90
discoverGitdirFunction · 0.90
_readCommitFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…