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

Function indexPack

src/api/indexPack.js:39–67  ·  view source on GitHub ↗
({
  fs,
  onProgress,
  dir,
  gitdir = join(dir, '.git'),
  filepath,
  cache = {},
})

Source from the content-addressed store, hash-verified

37 *
38 */
39export 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}

Calls 4

joinFunction · 0.90
assertParameterFunction · 0.90
discoverGitdirFunction · 0.90
_indexPackFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…