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

Method Cmp

reference.go:310–315  ·  view source on GitHub ↗

Cmp compares v to ref2. It returns 0 on equality, otherwise a stable sorting.

(ref2 *Reference)

Source from the content-addressed store, hash-verified

308// Cmp compares v to ref2. It returns 0 on equality, otherwise a
309// stable sorting.
310func (v *Reference) Cmp(ref2 *Reference) int {
311 ret := int(C.git_reference_cmp(v.ptr, ref2.ptr))
312 runtime.KeepAlive(v)
313 runtime.KeepAlive(ref2)
314 return ret
315}
316
317// Shorthand returns a "human-readable" short reference name.
318func (v *Reference) Shorthand() string {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected