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

Function NewOdb

odb.go:34–47  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

32}
33
34func NewOdb() (odb *Odb, err error) {
35 odb = new(Odb)
36
37 runtime.LockOSThread()
38 defer runtime.UnlockOSThread()
39
40 ret := C.git_odb_new(&odb.ptr)
41 if ret < 0 {
42 return nil, MakeGitError(ret)
43 }
44
45 runtime.SetFinalizer(odb, (*Odb).Free)
46 return odb, nil
47}
48
49func NewOdbBackendFromC(ptr unsafe.Pointer) (backend *OdbBackend) {
50 backend = &OdbBackend{ptr: (*C.git_odb_backend)(ptr)}

Callers 2

TestIndexerOutOfOrderFunction · 0.85
TestMempackFunction · 0.85

Calls 1

MakeGitErrorFunction · 0.85

Tested by 2

TestIndexerOutOfOrderFunction · 0.68
TestMempackFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…