Beispiel #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
}
Beispiel #2
0
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
}
Beispiel #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
}