Ejemplo n.º 1
0
func (revwalk *Revwalk) PushGlob(glob string) error {
	cglob := C.CString(glob)
	defer C.free(unsafe.Pointer(cglob))
	ecode := C.git_revwalk_push_glob(revwalk.git_revwalk, cglob)
	if ecode != git_SUCCESS {
		return gitError()
	}
	return nil
}
Ejemplo n.º 2
0
func (v *RevWalk) PushGlob(glob string) error {
	runtime.LockOSThread()
	defer runtime.UnlockOSThread()

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

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