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

Method PushRef

walk.go:84–97  ·  view source on GitHub ↗
(r string)

Source from the content-addressed store, hash-verified

82}
83
84func (v *RevWalk) PushRef(r string) error {
85 runtime.LockOSThread()
86 defer runtime.UnlockOSThread()
87
88 cstr := C.CString(r)
89 defer C.free(unsafe.Pointer(cstr))
90
91 ecode := C.git_revwalk_push_ref(v.ptr, cstr)
92 runtime.KeepAlive(v)
93 if ecode < 0 {
94 return MakeGitError(ecode)
95 }
96 return nil
97}
98
99func (v *RevWalk) PushHead() (err error) {
100 runtime.LockOSThread()

Callers

nothing calls this directly

Calls 2

MakeGitErrorFunction · 0.85
freeMethod · 0.80

Tested by

no test coverage detected