diff options
| author | Jeff Carr <[email protected]> | 2025-10-10 03:00:41 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-10 03:00:41 -0500 |
| commit | a08846b17f382a6c94017cc74e1efcbf8eec6376 (patch) | |
| tree | fd30c52a4bae895b2db068920ed4fbae694cbbef | |
| parent | f6f6dc08d7e00250e9825b5570971045d06403eb (diff) | |
test clone() behavior here
| -rw-r--r-- | doDirty.go | 4 | ||||
| -rw-r--r-- | scanRepoDir.go | 4 |
2 files changed, 5 insertions, 3 deletions
@@ -72,12 +72,12 @@ func doCheckDirty(repo *gitpb.Repo) error { if repo.CheckDirty() { // nothing changed } else { - log.Info("Repo changed to clean", repo.FullPath) + log.Info("IsDirty() said yes, then CheckDirty() immediately said no", repo.FullPath, repo.State, repo.StateChange) return log.Errorf("%s repo changed to clean", repo.FullPath) } } else { if repo.CheckDirty() { - log.Info("Repo changed to dirty", repo.FullPath) + log.Info("IsDirty() said no, then CheckDirty() immediately said yes", repo.FullPath, repo.State, repo.StateChange) return log.Errorf("%s repo changed to dirty", repo.FullPath) } else { // nothing changed diff --git a/scanRepoDir.go b/scanRepoDir.go index 21d107e..4597686 100644 --- a/scanRepoDir.go +++ b/scanRepoDir.go @@ -23,6 +23,7 @@ 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) @@ -47,6 +48,7 @@ func (f *Forge) TestScan() error { } return nil } +*/ func (f *Forge) checkNamespace(fullpath string) (*gitpb.Repo, error) { if repo := f.Repos.FindByFullPath(fullpath); repo != nil { @@ -103,7 +105,7 @@ func (f *Forge) rillScanDirsNew(fullpaths []string) (int, error) { if repo == nil { return nil } - repo = f.Repos.Append(repo) + repo = f.Repos.Clone(repo) f.VerifyBranchNames(repo) if f.Config.IsReadOnly(repo.GetGoPath()) { repo.ReadOnly = true |
