Example #1
0
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
}
Example #2
0
File: object.go Project: wid/git2go
// 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),
	}
}
Example #3
0
File: object.go Project: tmc/goit
func (o Object) Repository() *Repository {
	r := new(Repository)
	r.repo = C.git_object_owner(o.obj)
	return r
}