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

Function writeTree

src/api/writeTree.js:24–41  ·  view source on GitHub ↗
({ fs, dir, gitdir = join(dir, '.git'), tree })

Source from the content-addressed store, hash-verified

22 *
23 */
24export async function writeTree({ fs, dir, gitdir = join(dir, '.git'), tree }) {
25 try {
26 assertParameter('fs', fs)
27 assertParameter('gitdir', gitdir)
28 assertParameter('tree', tree)
29
30 const fsp = new FileSystem(fs)
31 const updatedGitdir = await discoverGitdir({ fsp, dotgit: gitdir })
32 return await _writeTree({
33 fs: fsp,
34 gitdir: updatedGitdir,
35 tree,
36 })
37 } catch (err) {
38 err.caller = 'git.writeTree'
39 throw err
40 }
41}

Callers 2

test-writeTree.jsFile · 0.85

Calls 4

joinFunction · 0.90
assertParameterFunction · 0.90
discoverGitdirFunction · 0.90
_writeTreeFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…