summaryrefslogtreecommitdiff
path: root/scan.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-02-16 17:55:53 -0600
committerJeff Carr <[email protected]>2024-02-16 17:55:53 -0600
commitc253a30fb61cdc956e1cefb8296e34bf74ddf90c (patch)
treefc4b962a2e768866619acce615deaa99fd56dde9 /scan.go
parentbdb761714361a3986834b8b50bb34cce45d01e4d (diff)
changing branches works
Diffstat (limited to 'scan.go')
-rw-r--r--scan.go18
1 files changed, 16 insertions, 2 deletions
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)