diff options
| author | Jeff Carr <[email protected]> | 2025-10-03 01:40:15 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-03 01:40:15 -0500 |
| commit | c06e309c54d8abd6ba5940dfe3ab260a1fb4ed06 (patch) | |
| tree | c781e09dc104a12319da70807175db9723ca1ab3 | |
| parent | abd48f2bbf43a8ee772b7da09edb411f59b61064 (diff) | |
make a fast Reload() using rill
| -rw-r--r-- | scanRepoDir.go | 4 | ||||
| -rw-r--r-- | structs.go | 2 |
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) @@ -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 |
