need correct logic here to read main branch name
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
73d711ad2b
commit
3d6002b055
10
git.go
10
git.go
|
@ -216,6 +216,14 @@ func (rs *RepoStatus) SetMainWorkingName(s string) {
|
|||
rs.mainWorkingName.SetValue(s)
|
||||
return
|
||||
}
|
||||
s = "guimaster"
|
||||
_, ok = rs.gitConfig.branches[s]
|
||||
if ok {
|
||||
log.Info("git branch", s, "seems to exist")
|
||||
rs.mainWorkingName.SetValue(s)
|
||||
return
|
||||
}
|
||||
|
||||
s = "master"
|
||||
_, ok = rs.gitConfig.branches[s]
|
||||
if ok {
|
||||
|
@ -232,7 +240,7 @@ func (rs *RepoStatus) SetMainWorkingName(s string) {
|
|||
return
|
||||
}
|
||||
|
||||
s = "notsure"
|
||||
s = "TODO: read .git/config"
|
||||
log.Warn("git branch", s, "does not seem to exist. TODO: figure out the server default")
|
||||
for name, _ := range rs.gitConfig.branches {
|
||||
log.Warn("git branch found. use this?", name)
|
||||
|
|
Loading…
Reference in New Issue