summaryrefslogtreecommitdiff
path: root/git.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-02-14 13:48:46 -0600
committerJeff Carr <[email protected]>2024-02-14 13:48:46 -0600
commit3d6002b0553c1ec8f3dcfae35ef053c7cc01413a (patch)
treeb85862f3a7116e4bb638353f4c197f80a5e09633 /git.go
parent73d711ad2b2ebb311fadf9ab3739589df890993a (diff)
need correct logic here to read main branch namev0.20.5
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'git.go')
-rw-r--r--git.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/git.go b/git.go
index a8bed77..3c8efae 100644
--- a/git.go
+++ b/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)