MCPcopy Create free account
hub / github.com/libgit2/git2go / SetUrl

Method SetUrl

remote.go:833–848  ·  view source on GitHub ↗
(remote, url string)

Source from the content-addressed store, hash-verified

831}
832
833func (c *RemoteCollection) SetUrl(remote, url string) error {
834 curl := C.CString(url)
835 defer C.free(unsafe.Pointer(curl))
836 cremote := C.CString(remote)
837 defer C.free(unsafe.Pointer(cremote))
838
839 runtime.LockOSThread()
840 defer runtime.UnlockOSThread()
841
842 ret := C.git_remote_set_url(c.repo.ptr, cremote, curl)
843 runtime.KeepAlive(c.repo)
844 if ret < 0 {
845 return MakeGitError(ret)
846 }
847 return nil
848}
849
850func (c *RemoteCollection) SetPushUrl(remote, url string) error {
851 curl := C.CString(url)

Callers

nothing calls this directly

Calls 2

MakeGitErrorFunction · 0.85
freeMethod · 0.80

Tested by

no test coverage detected