summaryrefslogtreecommitdiff
path: root/doExamine.go
blob: 7d8794a0d8f6ebf7c43aa77ee430ef80abf72a85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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
}