check mtimes here

This commit is contained in:
Jeff Carr 2025-09-11 06:57:38 -05:00
parent 74313bd867
commit f2ec2e74ee
1 changed files with 23 additions and 0 deletions

View File

@ -12,12 +12,35 @@ import (
"go.wit.com/log" "go.wit.com/log"
) )
func reloadCheck(repo *gitpb.Repo) error {
if err := repo.ReloadCheck(); err != nil {
log.Info("changed:", repo.FullPath)
// configSave = true
return err
}
return nil
}
func (f *Forge) ScanGoSrc() (bool, error) { func (f *Forge) ScanGoSrc() (bool, error) {
dirs, err := gitDirectoriesNew(f.goSrc) dirs, err := gitDirectoriesNew(f.goSrc)
if err != nil { if err != nil {
return false, err return false, err
} }
stats := f.RillRepos(reloadCheck)
for _, stat := range stats {
if stat.Err == nil {
continue
}
f.SetConfigSave(true)
/*
dur := stat.End.Sub(stat.Start)
if dur > time.Second {
log.Infof("%s checkRemoteBranches() took a long time (%s) (err=%v)\n", path, shell.FormatDuration(dur), stat.Err)
}
*/
}
var gopaths []string var gopaths []string
for _, dir := range dirs { for _, dir := range dirs {
// log.Info("forge.ScanGoSrc()", dir) // log.Info("forge.ScanGoSrc()", dir)