Example #1
0
func (v *Refdb) SetBackend(backend *RefdbBackend) (err error) {
	ret := C.git_refdb_set_backend(v.ptr, backend.ptr)
	if ret < 0 {
		backend.Free()
		return MakeGitError(ret)
	}
	return nil
}
Example #2
0
File: refdb.go Project: wid/git2go
func (v *Refdb) SetBackend(backend *RefdbBackend) (err error) {
	runtime.LockOSThread()
	defer runtime.UnlockOSThread()

	ret := C.git_refdb_set_backend(v.ptr, backend.ptr)
	if ret < 0 {
		backend.Free()
		return MakeGitError(ret)
	}
	return nil
}