From c253a30fb61cdc956e1cefb8296e34bf74ddf90c Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Fri, 16 Feb 2024 17:55:53 -0600 Subject: changing branches works --- scan.go | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'scan.go') diff --git a/scan.go b/scan.go index 0f98690..0e05cc5 100644 --- a/scan.go +++ b/scan.go @@ -3,11 +3,24 @@ package main import ( "fmt" "os/user" + "strings" "time" "go.wit.com/log" ) +func scanRepositories() { + log.Info("Scanned", me.summary.totalOL.String(), "repositories. todo: count/show changes") + t := timeFunction(func() { + for _, repo := range me.allrepos { + repo.status.UpdateNew() + repo.newScan() + } + }) + s := fmt.Sprint(t) + me.duration.SetText(s) +} + func (r *repo) newScan() bool { if r.status == nil { log.Warn("repo.status = nil. not initialized for some reason") @@ -48,8 +61,9 @@ func (r *repo) newScan() bool { r.lastTag.SetLabel(lasttag) r.vLabel.SetLabel(cbname + " " + cbversion) - if r.status.Changed() { - log.Warn("should scan here") + if c, ok := r.status.Changed(); ok { + c := strings.TrimSpace(c) + log.Warn("repo", r.status.Path(), "changed", c) } status := r.status.GetStatus() r.dirtyLabel.SetLabel(status) -- cgit v1.2.3