summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-30 14:08:34 -0500
committerJeff Carr <[email protected]>2025-10-30 14:08:34 -0500
commit7d0cd69dcfc99209ebb74e3a3427e7f1042322e2 (patch)
treec67e9a6394b351afbcff5ed5fb8a2c343e98d387
parentc3a4bbc7f34d55fcdefcf44dce7a93343dc2af81 (diff)
-rw-r--r--rill.go6
-rw-r--r--scanRepoDir.go10
2 files changed, 8 insertions, 8 deletions
diff --git a/rill.go b/rill.go
index 4ba75f9..ad181ee 100644
--- a/rill.go
+++ b/rill.go
@@ -164,19 +164,17 @@ func (f *Forge) RillRepos(rillf func(*gitpb.Repo) error) map[string]*RillStats {
func (f *Forge) RunOnReposNew(repos *gitpb.Repos, rillf func(*gitpb.Repo) error) *gitpb.Repos {
stats := f.RunOnRepos(repos, rillf)
failed := gitpb.NewRepos()
- counter := 1
for s, stat := range stats {
if stat.Err == nil {
continue
}
- counter += 1
found := f.Repos.FindByFullPath(s)
if found == nil {
log.Info("found", found, "'"+s+"'")
panic("wrong namespace logic. couldn't find repo from stats")
}
newr := failed.Clone(found)
- newr.State = fmt.Sprintf("%v (%d)", stat.Err, counter)
+ newr.State = fmt.Sprintf("%v", stat.Err)
}
return failed
@@ -195,7 +193,7 @@ func (f *Forge) RunOnReposNewDumb(repos *gitpb.Repos, rillf func(*gitpb.Repo) er
continue
}
newr := failed.Clone(repo)
- newr.State = fmt.Sprintf("%v (%d)", err, counter)
+ newr.State = fmt.Sprintf("%v) (%d)", err, counter)
counter += 1
}
diff --git a/scanRepoDir.go b/scanRepoDir.go
index 537acee..e8a85ef 100644
--- a/scanRepoDir.go
+++ b/scanRepoDir.go
@@ -40,12 +40,14 @@ func (f *Forge) checkNamespace(fullpath string) (*gitpb.Repo, error) {
func (f *Forge) RescanRepos() error {
gopath := env.Get("gopath")
+ fullpath := env.FullPath(gopath)
if env.Verbose() {
- log.Info("RescanRepos() running in", gopath)
+ log.Info("RescanRepos() running in", fullpath)
}
- f.scanRepoDir(gopath)
- f.Save()
- return errors.New("ScanReposByMode() not implemented yet")
+ f.scanRepoDir(fullpath)
+ err := f.Save()
+ // return errors.New("ScanReposByMode() not implemented yet")
+ return err
}
// scans for .git/ directories