MCPcopy Create free account
hub / github.com/go-git/go-git / MatchAny

Function MatchAny

config/refspec.go:147–155  ·  view source on GitHub ↗

MatchAny returns true if any of the RefSpec match with the given ReferenceName.

(l []RefSpec, n plumbing.ReferenceName)

Source from the content-addressed store, hash-verified

145
146// MatchAny returns true if any of the RefSpec match with the given ReferenceName.
147func MatchAny(l []RefSpec, n plumbing.ReferenceName) bool {
148 for _, r := range l {
149 if r.Match(n) {
150 return true
151 }
152 }
153
154 return false
155}

Callers 1

TestMatchAnyMethod · 0.85

Calls 1

MatchMethod · 0.65

Tested by 1

TestMatchAnyMethod · 0.68