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

Method FetchRefspecs

remote.go:922–937  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

920}
921
922func (o *Remote) FetchRefspecs() ([]string, error) {
923 crefspecs := C.git_strarray{}
924
925 runtime.LockOSThread()
926 defer runtime.UnlockOSThread()
927
928 ret := C.git_remote_get_fetch_refspecs(&crefspecs, o.ptr)
929 runtime.KeepAlive(o)
930 if ret < 0 {
931 return nil, MakeGitError(ret)
932 }
933 defer C.git_strarray_dispose(&crefspecs)
934
935 refspecs := makeStringsFromCStrings(crefspecs.strings, int(crefspecs.count))
936 return refspecs, nil
937}
938
939func (c *RemoteCollection) AddPush(remote, refspec string) error {
940 crefspec := C.CString(refspec)

Callers

nothing calls this directly

Calls 2

MakeGitErrorFunction · 0.85
makeStringsFromCStringsFunction · 0.85

Tested by

no test coverage detected