(remote, newname string)
| 810 | } |
| 811 | |
| 812 | func (c *RemoteCollection) Rename(remote, newname string) ([]string, error) { |
| 813 | cproblems := C.git_strarray{} |
| 814 | defer freeStrarray(&cproblems) |
| 815 | cnewname := C.CString(newname) |
| 816 | defer C.free(unsafe.Pointer(cnewname)) |
| 817 | cremote := C.CString(remote) |
| 818 | defer C.free(unsafe.Pointer(cremote)) |
| 819 | |
| 820 | runtime.LockOSThread() |
| 821 | defer runtime.UnlockOSThread() |
| 822 | |
| 823 | ret := C.git_remote_rename(&cproblems, c.repo.ptr, cremote, cnewname) |
| 824 | runtime.KeepAlive(c.repo) |
| 825 | if ret < 0 { |
| 826 | return []string{}, MakeGitError(ret) |
| 827 | } |
| 828 | |
| 829 | problems := makeStringsFromCStrings(cproblems.strings, int(cproblems.count)) |
| 830 | return problems, nil |
| 831 | } |
| 832 | |
| 833 | func (c *RemoteCollection) SetUrl(remote, url string) error { |
| 834 | curl := C.CString(url) |
nothing calls this directly
no test coverage detected