keep trying to fix init() and update()

This commit is contained in:
Jeff Carr 2024-12-17 21:14:39 -06:00
parent 7cdb2bf6a0
commit c4f9430e46
2 changed files with 3 additions and 11 deletions

10
init.go
View File

@ -35,7 +35,6 @@ func Init() *Forge {
}
f.rillUpdate(20, 10)
// f.updateAll()
if f.configSave {
f.ConfigSave()
@ -45,15 +44,6 @@ func Init() *Forge {
return f
}
func (f *Forge) updateAll() {
all := f.Repos.SortByFullPath()
for all.Scan() {
repo := all.Next()
f.updateRepo(repo)
}
}
// only init's the protobuf. intended to not scan or change anything
func InitPB() *Forge {
f := new(Forge)

View File

@ -46,10 +46,12 @@ func (f *Forge) updateRepo(repo *gitpb.Repo) error {
if repo.DidRepoChange() {
f.configSave = true
log.Info("repo changed", repo.StateChange, repo.FullPath)
log.Info("repo changed ", repo.FullPath, repo.StateChange)
if err := repo.Reload(); err != nil {
return err
}
} else {
// log.Info("repo did not change", repo.FullPath, repo.StateChange)
}
if f.Config.IsReadOnly(repo.GetGoPath()) {
if repo.ReadOnly {