({
fs,
dir,
gitdir = join(dir, '.git'),
oid,
filepath = undefined,
cache = {},
})
| 32 | * |
| 33 | */ |
| 34 | export 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 | } |
no test coverage detected
searching dependent graphs…