func (o *Remote) Connect(direction ConnectDirection) error { runtime.LockOSThread() defer runtime.UnlockOSThread() if ret := C.git_remote_connect(o.ptr, C.git_direction(direction)); ret != 0 { return MakeGitError(ret) } return nil }
func (o *Remote) Connect(direction ConnectDirection, callbacks *RemoteCallbacks) error { var ccallbacks C.git_remote_callbacks populateRemoteCallbacks(&ccallbacks, callbacks) runtime.LockOSThread() defer runtime.UnlockOSThread() if ret := C.git_remote_connect(o.ptr, C.git_direction(direction), &ccallbacks); ret != 0 { return MakeGitError(ret) } return nil }