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

Method CreateAnonymous

remote.go:746–761  ·  view source on GitHub ↗
(url string)

Source from the content-addressed store, hash-verified

744}
745
746func (c *RemoteCollection) CreateAnonymous(url string) (*Remote, error) {
747 remote := &Remote{repo: c.repo}
748
749 curl := C.CString(url)
750 defer C.free(unsafe.Pointer(curl))
751
752 runtime.LockOSThread()
753 defer runtime.UnlockOSThread()
754
755 ret := C.git_remote_create_anonymous(&remote.ptr, c.repo.ptr, curl)
756 if ret < 0 {
757 return nil, MakeGitError(ret)
758 }
759 c.trackRemote(remote)
760 return remote, nil
761}
762
763func (c *RemoteCollection) Lookup(name string) (*Remote, error) {
764 remote := &Remote{repo: c.repo}

Callers 1

Calls 3

trackRemoteMethod · 0.95
MakeGitErrorFunction · 0.85
freeMethod · 0.80

Tested by 1