MCPcopy
hub / github.com/go-git/go-git / Match

Method Match

config/refspec.go:83–89  ·  view source on GitHub ↗

Match match the given plumbing.ReferenceName against the source.

(n plumbing.ReferenceName)

Source from the content-addressed store, hash-verified

81
82// Match match the given plumbing.ReferenceName against the source.
83func (s RefSpec) Match(n plumbing.ReferenceName) bool {
84 if !s.IsWildcard() {
85 return s.matchExact(n)
86 }
87
88 return s.matchGlob(n)
89}
90
91// IsWildcard returns true if the RefSpec contains a wildcard.
92func (s RefSpec) IsWildcard() bool {

Callers

nothing calls this directly

Calls 3

IsWildcardMethod · 0.95
matchExactMethod · 0.95
matchGlobMethod · 0.95

Tested by

no test coverage detected