MCPcopy
hub / github.com/mislav/hub / IsMaster

Method IsMaster

github/branch.go:46–49  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

44}
45
46func (b *Branch) IsMaster() bool {
47 masterName := b.Repo.MasterBranch().ShortName()
48 return b.ShortName() == masterName
49}
50
51func (b *Branch) IsRemote() bool {
52 return strings.HasPrefix(b.Name, "refs/remotes")

Callers 2

compareFunction · 0.95
browseFunction · 0.80

Calls 2

ShortNameMethod · 0.95
MasterBranchMethod · 0.80

Tested by

no test coverage detected