Esempio n. 1
0
func (revwalk *Revwalk) HideRef(ref string) error {
	cref := C.CString(ref)
	defer C.free(unsafe.Pointer(cref))
	ecode := C.git_revwalk_hide_ref(revwalk.git_revwalk, cref)
	if ecode != git_SUCCESS {
		return gitError()
	}
	return nil
}
Esempio n. 2
0
func (v *RevWalk) HideRef(r string) error {
	runtime.LockOSThread()
	defer runtime.UnlockOSThread()

	cstr := C.CString(r)
	defer C.free(unsafe.Pointer(cstr))

	ecode := C.git_revwalk_hide_ref(v.ptr, cstr)
	if ecode < 0 {
		return MakeGitError(ecode)
	}
	return nil
}