Get rid of Owner() on Remote and Submdoule

These are inherently unsafe. The underlying pointer might get released
at any moment.
This commit is contained in:
Carlos Martín Nieto 2015-06-28 00:49:56 +02:00
parent d400f1d5b2
commit ba0a24087a
2 changed files with 0 additions and 10 deletions

View File

@ -421,10 +421,6 @@ func (repo *Repository) LookupRemote(name string) (*Remote, error) {
return remote, nil
}
func (o *Remote) Owner() Repository {
return Repository{C.git_remote_owner(o.ptr)}
}
func (o *Remote) Name() string {
return C.GoString(C.git_remote_name(o.ptr))
}

View File

@ -158,12 +158,6 @@ func (sub *Submodule) AddToIndex(write_index bool) error {
return nil
}
func (sub *Submodule) Owner() *Repository {
repo := C.git_submodule_owner(sub.ptr)
//FIXME: how to handle dangling references ?
return &Repository{repo}
}
func (sub *Submodule) Name() string {
n := C.git_submodule_name(sub.ptr)
return C.GoString(n)