Owner returns a weak reference to the repository which owns this reference. This won't keep the underlying repository alive, but it should still be Freed.
()
| 299 | // This won't keep the underlying repository alive, but it should still be |
| 300 | // Freed. |
| 301 | func (v *Reference) Owner() *Repository { |
| 302 | repo := newRepositoryFromC(C.git_reference_owner(v.ptr)) |
| 303 | runtime.KeepAlive(v) |
| 304 | repo.weak = true |
| 305 | return repo |
| 306 | } |
| 307 | |
| 308 | // Cmp compares v to ref2. It returns 0 on equality, otherwise a |
| 309 | // stable sorting. |
nothing calls this directly
no test coverage detected