SrcMatches checks if a refspec's destination descriptor matches a reference
(refname string)
| 102 | |
| 103 | // SrcMatches checks if a refspec's destination descriptor matches a reference |
| 104 | func (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 |
| 113 | func (s *Refspec) Transform(refname string) (string, error) { |