(remote, refspec string)
| 937 | } |
| 938 | |
| 939 | func (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 | |
| 956 | func (o *Remote) PushRefspecs() ([]string, error) { |
| 957 | crefspecs := C.git_strarray{} |
nothing calls this directly
no test coverage detected