summaryrefslogtreecommitdiff
path: root/addRepo.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-12-01 00:48:07 -0600
committerJeff Carr <[email protected]>2024-12-01 00:48:07 -0600
commitafe21d3c626200fa647f9597f6037535d2d8554c (patch)
tree7828ce4cdcf11e80f1d54e6e30344682df9cbaec /addRepo.go
parentb1cdb841bc7240fc9aa929ad15a09f0ae618777b (diff)
Diffstat (limited to 'addRepo.go')
-rw-r--r--addRepo.go36
1 files changed, 7 insertions, 29 deletions
diff --git a/addRepo.go b/addRepo.go
index f2555f7..f65c688 100644
--- a/addRepo.go
+++ b/addRepo.go
@@ -1,12 +1,10 @@
package main
import (
- "os"
"strings"
"time"
"go.wit.com/lib/gadgets"
- "go.wit.com/lib/gui/repostatus"
"go.wit.com/log"
)
@@ -55,39 +53,23 @@ func (c *controlBox) addRepo(path string) {
c.tagDate = gadgets.NewBasicEntry(c.grid, "git tag Date")
c.grid.NextRow()
- err, repo := repostatus.NewRepoStatusWindow(path)
- if err != nil {
- log.Info("path did not work", path, err)
- return
- }
- if repo == nil {
- log.Info("repo == nil", path, err)
- os.Exit(-1)
- return
- }
- c.status = repo
- // c.status.SetMainWorkingName("master")
- // c.status.SetDevelWorkingName("devel")
- // c.status.SetUserWorkingName("jcarr")
- c.status.Update()
+ cbname := repo.GetCurrentBranchName()
+ cbversion := repo.GetCurrentBranchVersion()
+ debversion := repo.DebianCurrentVersion()
- cbname := c.status.GetCurrentBranchName()
- cbversion := c.status.GetCurrentBranchVersion()
- debversion := c.status.DebianCurrentVersion()
-
- if c.status.CheckDirty() {
+ if repo.CheckDirty() {
c.dirtyL.SetText("true")
} else {
c.dirtyL.SetText("false")
}
if c.GoPath.String() == "" {
- c.GoPath.SetText(c.status.GoPath())
+ c.GoPath.SetText(repo.GoPath)
}
- lasttag := c.status.GetLastTagVersion()
+ lasttag := repo.GetLastTagVersion()
if argv.Release {
- debversion = c.status.DebianReleaseVersion()
+ debversion = repo.DebianReleaseVersion()
c.dirtyL.SetText("false")
}
@@ -99,9 +81,5 @@ func (c *controlBox) addRepo(path string) {
tagDate := c.getDateStamp(lasttag)
c.tagDate.SetText(tagDate)
- if s, ok := c.status.Changed(); ok {
- log.Warn("should scan here", s)
- }
-
return
}