func (obj *Object) Owner() *Repository { repo := new(Repository) repo.git_repository = C.git_object_owner(obj.git_object) if repo.git_repository == nil { return nil } return repo }
// Owner returns a weak reference to the repository which owns this // object func (o gitObject) Owner() *Repository { return &Repository{ ptr: C.git_object_owner(o.ptr), } }
func (o Object) Repository() *Repository { r := new(Repository) r.repo = C.git_object_owner(o.obj) return r }