예제 #1
0
func (ref *Reference) Owner() *Repository {
	repo := new(Repository)
	repo.git_repository = C.git_reference_owner(ref.git_reference)
	if repo.git_repository == nil {
		return nil
	}
	return repo
}
예제 #2
0
// Owner returns a weak reference to the repository which owns this
// reference.
func (v *Reference) Owner() *Repository {
	return &Repository{
		ptr: C.git_reference_owner(v.ptr),
	}
}