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 }
// 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), } }