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

Method PushRefspecs

remote.go:956–971  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

954}
955
956func (o *Remote) PushRefspecs() ([]string, error) {
957 crefspecs := C.git_strarray{}
958
959 runtime.LockOSThread()
960 defer runtime.UnlockOSThread()
961
962 ret := C.git_remote_get_push_refspecs(&crefspecs, o.ptr)
963 if ret < 0 {
964 return nil, MakeGitError(ret)
965 }
966 defer C.git_strarray_dispose(&crefspecs)
967 runtime.KeepAlive(o)
968
969 refspecs := makeStringsFromCStrings(crefspecs.strings, int(crefspecs.count))
970 return refspecs, nil
971}
972
973func (o *Remote) RefspecCount() uint {
974 count := C.git_remote_refspec_count(o.ptr)

Callers

nothing calls this directly

Calls 2

MakeGitErrorFunction · 0.85
makeStringsFromCStringsFunction · 0.85

Tested by

no test coverage detected