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

Method SetBackend

refdb.go:47–59  ·  view source on GitHub ↗
(backend *RefdbBackend)

Source from the content-addressed store, hash-verified

45}
46
47func (v *Refdb) SetBackend(backend *RefdbBackend) (err error) {
48 runtime.LockOSThread()
49 defer runtime.UnlockOSThread()
50
51 ret := C.git_refdb_set_backend(v.ptr, backend.ptr)
52 runtime.KeepAlive(v)
53 runtime.KeepAlive(backend)
54 if ret < 0 {
55 backend.Free()
56 return MakeGitError(ret)
57 }
58 return nil
59}
60
61func (v *RefdbBackend) Free() {
62 runtime.SetFinalizer(v, nil)

Callers

nothing calls this directly

Calls 2

MakeGitErrorFunction · 0.85
FreeMethod · 0.65

Tested by

no test coverage detected