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

Method SrcMatches

refspec.go:95–101  ·  view source on GitHub ↗

SrcMatches checks if a refspec's source descriptor matches a reference

(refname string)

Source from the content-addressed store, hash-verified

93
94// SrcMatches checks if a refspec's source descriptor matches a reference
95func (s *Refspec) SrcMatches(refname string) bool {
96 cname := C.CString(refname)
97 defer C.free(unsafe.Pointer(cname))
98
99 matches := C.git_refspec_src_matches(s.ptr, cname)
100 return matches != 0
101}
102
103// SrcMatches checks if a refspec's destination descriptor matches a reference
104func (s *Refspec) DstMatches(refname string) bool {

Callers 1

TestRefspecFunction · 0.80

Calls 1

freeMethod · 0.80

Tested by 1

TestRefspecFunction · 0.64