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

Method Odb

repository.go:665–679  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

663}
664
665func (v *Repository) Odb() (odb *Odb, err error) {
666 odb = new(Odb)
667
668 runtime.LockOSThread()
669 defer runtime.UnlockOSThread()
670
671 ret := C.git_repository_odb(&odb.ptr, v.ptr)
672 runtime.KeepAlive(v)
673 if ret < 0 {
674 return nil, MakeGitError(ret)
675 }
676
677 runtime.SetFinalizer(odb, (*Odb).Free)
678 return odb, nil
679}
680
681func (repo *Repository) Path() string {
682 s := C.GoString(C.git_repository_path(repo.ptr))

Callers 11

TestDiffBlobsFunction · 0.80
TestIndexWriteTreeToFunction · 0.80
TestIndexRemoveDirectoryFunction · 0.80
TestTreeBuilderInsertFunction · 0.80
TestOdbReadFunction · 0.80
TestOdbStreamFunction · 0.80
TestOdbHashFunction · 0.80
TestOdbForeachFunction · 0.80
TestOdbWritepackFunction · 0.80
TestOdbBackendLooseFunction · 0.80

Calls 1

MakeGitErrorFunction · 0.85

Tested by 11

TestDiffBlobsFunction · 0.64
TestIndexWriteTreeToFunction · 0.64
TestIndexRemoveDirectoryFunction · 0.64
TestTreeBuilderInsertFunction · 0.64
TestOdbReadFunction · 0.64
TestOdbStreamFunction · 0.64
TestOdbHashFunction · 0.64
TestOdbForeachFunction · 0.64
TestOdbWritepackFunction · 0.64
TestOdbBackendLooseFunction · 0.64