MCPcopy Create free account
hub / github.com/isomorphic-git/isomorphic-git / readTree

Function readTree

src/api/readTree.js:34–60  ·  view source on GitHub ↗
({
  fs,
  dir,
  gitdir = join(dir, '.git'),
  oid,
  filepath = undefined,
  cache = {},
})

Source from the content-addressed store, hash-verified

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

Calls 4

joinFunction · 0.90
assertParameterFunction · 0.90
discoverGitdirFunction · 0.90
_readTreeFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…