MCPcopy Create free account
hub / github.com/libgit2/git2go / Write

Method Write

tree.go:229–242  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

227}
228
229func (v *TreeBuilder) Write() (*Oid, error) {
230 oid := new(Oid)
231
232 runtime.LockOSThread()
233 defer runtime.UnlockOSThread()
234
235 err := C.git_treebuilder_write(oid.toC(), v.ptr)
236 runtime.KeepAlive(v)
237 if err < 0 {
238 return nil, MakeGitError(err)
239 }
240
241 return oid, nil
242}

Callers

nothing calls this directly

Calls 2

MakeGitErrorFunction · 0.85
toCMethod · 0.45

Tested by

no test coverage detected