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