keep trying to fix init() and update()
This commit is contained in:
parent
7cdb2bf6a0
commit
c4f9430e46
10
init.go
10
init.go
|
@ -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)
|
||||
|
|
4
rill.go
4
rill.go
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue