()
| 650 | } |
| 651 | |
| 652 | func (c *RemoteCollection) List() ([]string, error) { |
| 653 | var r C.git_strarray |
| 654 | |
| 655 | runtime.LockOSThread() |
| 656 | defer runtime.UnlockOSThread() |
| 657 | |
| 658 | ecode := C.git_remote_list(&r, c.repo.ptr) |
| 659 | runtime.KeepAlive(c.repo) |
| 660 | if ecode < 0 { |
| 661 | return nil, MakeGitError(ecode) |
| 662 | } |
| 663 | defer C.git_strarray_dispose(&r) |
| 664 | |
| 665 | remotes := makeStringsFromCStrings(r.strings, int(r.count)) |
| 666 | return remotes, nil |
| 667 | } |
| 668 | |
| 669 | func (c *RemoteCollection) Create(name string, url string) (*Remote, error) { |
| 670 | remote := &Remote{repo: c.repo} |
nothing calls this directly
no test coverage detected