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

Method AddPush

remote.go:939–954  ·  view source on GitHub ↗
(remote, refspec string)

Source from the content-addressed store, hash-verified

937}
938
939func (c *RemoteCollection) AddPush(remote, refspec string) error {
940 crefspec := C.CString(refspec)
941 defer C.free(unsafe.Pointer(crefspec))
942 cremote := C.CString(remote)
943 defer C.free(unsafe.Pointer(cremote))
944
945 runtime.LockOSThread()
946 defer runtime.UnlockOSThread()
947
948 ret := C.git_remote_add_push(c.repo.ptr, cremote, crefspec)
949 runtime.KeepAlive(c.repo)
950 if ret < 0 {
951 return MakeGitError(ret)
952 }
953 return nil
954}
955
956func (o *Remote) PushRefspecs() ([]string, error) {
957 crefspecs := C.git_strarray{}

Callers

nothing calls this directly

Calls 2

MakeGitErrorFunction · 0.85
freeMethod · 0.80

Tested by

no test coverage detected