MCPcopy Create free account
hub / github.com/libgit2/git2go / Owner

Method Owner

reference.go:301–306  ·  view source on GitHub ↗

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.

()

Source from the content-addressed store, hash-verified

299// This won't keep the underlying repository alive, but it should still be
300// Freed.
301func (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.

Callers

nothing calls this directly

Calls 1

newRepositoryFromCFunction · 0.85

Tested by

no test coverage detected