From 9acbb24284ecda4f5ace1cb3d200e363c47c8725 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Fri, 17 Jan 2025 10:59:05 -0600 Subject: start an 'examine' argv --- doExamine.go | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 doExamine.go (limited to 'doExamine.go') diff --git a/doExamine.go b/doExamine.go new file mode 100644 index 0000000..7d8794a --- /dev/null +++ b/doExamine.go @@ -0,0 +1,28 @@ +package main + +import ( + "time" + + "go.wit.com/lib/gui/shell" + "go.wit.com/lib/protobuf/gitpb" + "go.wit.com/log" +) + +func doExamine() bool { + me.found = new(gitpb.Repos) + all := me.forge.Repos.SortByFullPath() + for all.Scan() { + repo := all.Next() + if tag := repo.ExamineBranches(); tag != nil { + me.found.AppendByGoPath(repo) + ctime := tag.Creatordate.AsTime() + dur := time.Since(ctime) + log.Printf("UNKNOWN BRANCH %-50s %s %4s %s\n", repo.GetFullPath(), tag.Hash, shell.FormatDuration(dur), tag.Refname) + } + } + if len(me.found.Repos) == 0 { + return true + } + me.forge.PrintHumanTableDirty(me.found) + return false +} -- cgit v1.2.3