MCPcopy
hub / github.com/mislav/hub / ShortName

Method ShortName

github/branch.go:16–19  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14}
15
16func (b *Branch) ShortName() string {
17 reg := regexp.MustCompile("^refs/(remotes/)?.+?/")
18 return reg.ReplaceAllString(b.Name, "")
19}
20
21func (b *Branch) LongName() string {
22 reg := regexp.MustCompile("^refs/(remotes/)?")

Callers 14

compareFunction · 0.95
UpstreamMethod · 0.95
IsMasterMethod · 0.95
TestBranch_ShortNameFunction · 0.95
branchInURLFunction · 0.80
transformPushArgsFunction · 0.80
findCurrentPullRequestFunction · 0.80
deducePushTargetFunction · 0.80
syncFunction · 0.80
transformCheckoutArgsFunction · 0.80
pullRequestFunction · 0.80

Calls

no outgoing calls

Tested by 1

TestBranch_ShortNameFunction · 0.76