示例#1
0
func (revwalk *Revwalk) HideGlob(glob string) error {
	cglob := C.CString(glob)
	defer C.free(unsafe.Pointer(cglob))
	ecode := C.git_revwalk_hide_glob(revwalk.git_revwalk, cglob)
	if ecode != git_SUCCESS {
		return gitError()
	}
	return nil
}
示例#2
0
文件: walk.go 项目: jingweno/git2go
func (v *RevWalk) HideGlob(glob string) error {
	runtime.LockOSThread()
	defer runtime.UnlockOSThread()

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

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