Exemplo n.º 1
0
func (remote *Remote) Connect(direction Direction) error {
	ecode := C.git_remote_connect(remote.git_remote, C.int(direction))
	if ecode != git_SUCCESS {
		return gitError()
	}
	return nil
}
Exemplo n.º 2
0
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
}
Exemplo n.º 3
0
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
}