From 6abbecf0bf0ca87b3d2049e9cfe33365d9c9dda4 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Tue, 7 Oct 2025 11:36:35 -0500 Subject: more table summary stats --- tableDefault.go | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'tableDefault.go') diff --git a/tableDefault.go b/tableDefault.go index 49c16c2..39857c6 100644 --- a/tableDefault.go +++ b/tableDefault.go @@ -13,7 +13,25 @@ import ( func (f *Forge) PrintDefaultTB(pb *gitpb.Repos) { tablePB := f.makeDefaultTB(pb) tablePB.PrintTable() - log.Printf("fpb.PrintDefaultTB: %d repos\n", pb.Len()) + var dirty int + var writable int + var bins int + var protos int + for repo := range pb.IterAll() { + if repo.IsDirty() { + dirty += 1 + } + if repo.IsBinary() { + bins += 1 + } + if repo.IsProtobuf() { + protos += 1 + } + if f.Config.IsWritable(repo.Namespace) { + writable += 1 + } + } + log.Printf("f.DefaultRepos: total=(%d) dirty=(%d) writable=(%d) binaries=(%d) protobufs(%d)\n", pb.Len(), dirty, writable, bins, protos) } func (f *Forge) getRepoType(repo *gitpb.Repo) string { -- cgit v1.2.3