예제 #1
0
func (ref *Reference) Resolve() (*Reference, error) {
	resolved := new(Reference)
	ecode := C.git_reference_resolve(&resolved.git_reference, ref.git_reference)
	if ecode != git_SUCCESS {
		return nil, gitError()
	}
	return ref, nil
}
예제 #2
0
파일: reference.go 프로젝트: pjvds/git2go
func (v *Reference) Resolve() (*Reference, error) {
	var ptr *C.git_reference

	ret := C.git_reference_resolve(&ptr, v.ptr)
	if ret < 0 {
		return nil, LastError()
	}

	return newReferenceFromC(ptr), nil
}
예제 #3
0
func (v *Reference) Resolve() (*Reference, error) {
	var ptr *C.git_reference

	runtime.LockOSThread()
	defer runtime.UnlockOSThread()

	ret := C.git_reference_resolve(&ptr, v.ptr)
	if ret < 0 {
		return nil, MakeGitError(ret)
	}

	return newReferenceFromC(ptr), nil
}