Exemple #1
0
func (odb *Odb) AddBackend(backend *OdbBackend, priority int) error {
	ecode := C.git_odb_add_backend(odb.git_odb, backend.git_odb_backend, C.int(priority))
	if ecode != git_SUCCESS {
		return gitError()
	}
	return nil
}
Exemple #2
0
func (v *Odb) AddBackend(backend *OdbBackend, priority int) (err error) {
	ret := C.git_odb_add_backend(v.ptr, backend.ptr, C.int(priority))
	if ret < 0 {
		backend.Free()
		return MakeGitError(ret)
	}
	return nil
}
Exemple #3
0
func (v *Odb) AddBackend(backend *OdbBackend, priority int) (err error) {

	runtime.LockOSThread()
	defer runtime.UnlockOSThread()

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