({
fs,
onProgress,
dir,
gitdir = join(dir, '.git'),
filepath,
cache = {},
})
| 37 | * |
| 38 | */ |
| 39 | export async function indexPack({ |
| 40 | fs, |
| 41 | onProgress, |
| 42 | dir, |
| 43 | gitdir = join(dir, '.git'), |
| 44 | filepath, |
| 45 | cache = {}, |
| 46 | }) { |
| 47 | try { |
| 48 | assertParameter('fs', fs) |
| 49 | assertParameter('dir', dir) |
| 50 | assertParameter('gitdir', dir) |
| 51 | assertParameter('filepath', filepath) |
| 52 | |
| 53 | const fsp = new FileSystem(fs) |
| 54 | const updatedGitdir = await discoverGitdir({ fsp, dotgit: gitdir }) |
| 55 | return await _indexPack({ |
| 56 | fs: fsp, |
| 57 | cache, |
| 58 | onProgress, |
| 59 | dir, |
| 60 | gitdir: updatedGitdir, |
| 61 | filepath, |
| 62 | }) |
| 63 | } catch (err) { |
| 64 | err.caller = 'git.indexPack' |
| 65 | throw err |
| 66 | } |
| 67 | } |
no test coverage detected
searching dependent graphs…