Ejemplo n.º 1
0
func (sub *Submodule) SetUrl(url string) error {
	curl := C.CString(url)
	defer C.free(unsafe.Pointer(curl))

	ret := C.git_submodule_set_url(sub.ptr, curl)
	if ret < 0 {
		return LastError()
	}
	return nil
}
Ejemplo n.º 2
0
func (sub *Submodule) SetUrl(url string) error {
	curl := C.CString(url)
	defer C.free(unsafe.Pointer(curl))

	runtime.LockOSThread()
	defer runtime.UnlockOSThread()

	ret := C.git_submodule_set_url(sub.ptr, curl)
	if ret < 0 {
		return MakeGitError(ret)
	}
	return nil
}
Ejemplo n.º 3
0
func (c *SubmoduleCollection) SetUrl(submodule, url string) error {
	csubmodule := C.CString(submodule)
	defer C.free(unsafe.Pointer(csubmodule))
	curl := C.CString(url)
	defer C.free(unsafe.Pointer(curl))

	runtime.LockOSThread()
	defer runtime.UnlockOSThread()

	ret := C.git_submodule_set_url(c.repo.ptr, csubmodule, curl)
	if ret < 0 {
		return MakeGitError(ret)
	}
	return nil
}