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

Method DstMatches

refspec.go:104–110  ·  view source on GitHub ↗

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

(refname string)

Source from the content-addressed store, hash-verified

102
103// SrcMatches checks if a refspec's destination descriptor matches a reference
104func (s *Refspec) DstMatches(refname string) bool {
105 cname := C.CString(refname)
106 defer C.free(unsafe.Pointer(cname))
107
108 matches := C.git_refspec_dst_matches(s.ptr, cname)
109 return matches != 0
110}
111
112// Transform a reference to its target following the refspec's rules
113func (s *Refspec) Transform(refname string) (string, error) {

Callers 1

TestRefspecFunction · 0.80

Calls 1

freeMethod · 0.80

Tested by 1

TestRefspecFunction · 0.64