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

Method Reverse

config/refspec.go:135–140  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

133}
134
135func (s RefSpec) Reverse() RefSpec {
136 spec := string(s)
137 separator := strings.Index(spec, refSpecSeparator)
138
139 return RefSpec(spec[separator+1:] + refSpecSeparator + spec[:separator])
140}
141
142func (s RefSpec) String() string {
143 return string(s)

Callers 4

pruneRemotesMethod · 0.80
deleteReferencesMethod · 0.80
NewFunction · 0.80
TestRefSpecReverseMethod · 0.80

Calls 2

RefSpecTypeAlias · 0.85
IndexMethod · 0.65

Tested by 1

TestRefSpecReverseMethod · 0.64