summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-01-13 23:29:27 -0600
committerJeff Carr <[email protected]>2024-01-13 23:29:27 -0600
commit0d49ed20ac2d27d6de0881d00ea1a366be8263d6 (patch)
treee9d588e43dc49354da1b30366ce2965ae2db9026
parent6223ffe7bf68868e92e9c0486b5ad4f5afbc2748 (diff)
allow branch namesv0.12.1
Signed-off-by: Jeff Carr <[email protected]>
-rw-r--r--draw.go8
-rw-r--r--git.go14
2 files changed, 19 insertions, 3 deletions
diff --git a/draw.go b/draw.go
index 80e3743..3143cc5 100644
--- a/draw.go
+++ b/draw.go
@@ -24,7 +24,7 @@ func draw(rs *RepoStatus) {
rs.drawGitCommands()
// figure out what the state of the git repository is
- rs.Update()
+ // rs.Update()
}
func (rs *RepoStatus) drawGitBranches() {
@@ -48,13 +48,15 @@ func (rs *RepoStatus) drawGitBranches() {
master = "main"
}
}
- rs.masterDrop.Set(master)
+ // rs.masterDrop.Set(master)
// relabel the various gadgets with the right branch name
rs.masterBranchVersion.SetLabel(master)
- rs.major.SetTitle(master)
+ // rs.major.SetTitle(master)
+ /*
rs.develDrop.Set("devel")
rs.userDrop.Set("jcarr")
+ */
var count *gui.Node
diff --git a/git.go b/git.go
index c240f2b..cbfcd5c 100644
--- a/git.go
+++ b/git.go
@@ -125,6 +125,20 @@ func (rs *RepoStatus) checkoutBranch(level string, branch string) {
}
}
+func (rs *RepoStatus) SetMasterName(s string) {
+ rs.masterDrop.Set(s)
+ rs.masterBranchVersion.SetLabel(s)
+ // rs.major.SetTitle(s)
+}
+
+func (rs *RepoStatus) SetDevelName(s string) {
+ rs.develDrop.Set(s)
+}
+
+func (rs *RepoStatus) SetUserName(s string) {
+ rs.userDrop.Set(s)
+}
+
// returns "master", "devel", os.Username, etc
func (rs *RepoStatus) GetMasterName() string {
name := rs.masterDrop.Get()