summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-03 01:40:15 -0500
committerJeff Carr <[email protected]>2025-10-03 01:40:15 -0500
commitc06e309c54d8abd6ba5940dfe3ab260a1fb4ed06 (patch)
treec781e09dc104a12319da70807175db9723ca1ab3
parentabd48f2bbf43a8ee772b7da09edb411f59b61064 (diff)
make a fast Reload() using rill
-rw-r--r--scanRepoDir.go4
-rw-r--r--structs.go2
2 files changed, 5 insertions, 1 deletions
diff --git a/scanRepoDir.go b/scanRepoDir.go
index 5f65cb6..cfadf9a 100644
--- a/scanRepoDir.go
+++ b/scanRepoDir.go
@@ -19,6 +19,10 @@ func reloadCheck(repo *gitpb.Repo) error {
return nil
}
+func (f *Forge) Reload() map[string]*RillStats {
+ return f.RillRepos(reloadCheck)
+}
+
func (f *Forge) TestScan() error {
f.Repos = gitpb.NewRepos()
dirs, err := gitDirectoriesNew(f.Config.ReposDir)
diff --git a/structs.go b/structs.go
index da55140..b96e676 100644
--- a/structs.go
+++ b/structs.go
@@ -8,7 +8,7 @@ import (
// maybe an interface someday?
type Forge struct {
- once sync.Once // one-time initialized data
+ once sync.Once // one-time initialized data
Config *ForgeConfigs // config repos for readonly, private, etc
Repos *gitpb.Repos // the repo protobufs
Patchsets *Sets // patches that are in progress