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

Method InsertCommit

packbuilder.go:63–74  ·  view source on GitHub ↗
(id *Oid)

Source from the content-addressed store, hash-verified

61}
62
63func (pb *Packbuilder) InsertCommit(id *Oid) error {
64 runtime.LockOSThread()
65 defer runtime.UnlockOSThread()
66
67 ret := C.git_packbuilder_insert_commit(pb.ptr, id.toC())
68 runtime.KeepAlive(pb)
69 runtime.KeepAlive(id)
70 if ret != 0 {
71 return MakeGitError(ret)
72 }
73 return nil
74}
75
76func (pb *Packbuilder) InsertTree(id *Oid) error {
77 runtime.LockOSThread()

Callers

nothing calls this directly

Calls 2

MakeGitErrorFunction · 0.85
toCMethod · 0.45

Tested by

no test coverage detected