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

Method Src

config/refspec.go:68–80  ·  view source on GitHub ↗

Src returns the src side.

()

Source from the content-addressed store, hash-verified

66
67// Src returns the src side.
68func (s RefSpec) Src() string {
69 spec := string(s)
70
71 var start int
72 if s.IsForceUpdate() {
73 start = 1
74 } else {
75 start = 0
76 }
77
78 end := strings.Index(spec, refSpecSeparator)
79 return spec[start:end]
80}
81
82// Match match the given plumbing.ReferenceName against the source.
83func (s RefSpec) Match(n plumbing.ReferenceName) bool {

Callers 9

IsExactSHA1Method · 0.95
matchExactMethod · 0.95
matchGlobMethod · 0.95
DstMethod · 0.95
ErrorMethod · 0.80
addOrUpdateReferencesMethod · 0.80
doCalculateRefsFunction · 0.80
TestRefSpecSrcMethod · 0.80

Calls 2

IsForceUpdateMethod · 0.95
IndexMethod · 0.65

Tested by 1

TestRefSpecSrcMethod · 0.64