(remote, url string)
| 848 | } |
| 849 | |
| 850 | func (c *RemoteCollection) SetPushUrl(remote, url string) error { |
| 851 | curl := C.CString(url) |
| 852 | defer C.free(unsafe.Pointer(curl)) |
| 853 | cremote := C.CString(remote) |
| 854 | defer C.free(unsafe.Pointer(cremote)) |
| 855 | |
| 856 | runtime.LockOSThread() |
| 857 | defer runtime.UnlockOSThread() |
| 858 | |
| 859 | ret := C.git_remote_set_pushurl(c.repo.ptr, cremote, curl) |
| 860 | runtime.KeepAlive(c.repo) |
| 861 | if ret < 0 { |
| 862 | return MakeGitError(ret) |
| 863 | } |
| 864 | return nil |
| 865 | } |
| 866 | |
| 867 | func (c *RemoteCollection) AddFetch(remote, refspec string) error { |
| 868 | crefspec := C.CString(refspec) |
nothing calls this directly
no test coverage detected