summaryrefslogtreecommitdiff
path: root/repoNew.go
diff options
context:
space:
mode:
Diffstat (limited to 'repoNew.go')
-rw-r--r--repoNew.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/repoNew.go b/repoNew.go
index d5caa18..1b8173a 100644
--- a/repoNew.go
+++ b/repoNew.go
@@ -5,6 +5,7 @@ import (
"os"
"path/filepath"
"regexp"
+ "slices"
"strings"
"go.wit.com/lib/protobuf/gitpb"
@@ -13,11 +14,20 @@ import (
func (f *Forge) NewGoRepo(gopath string, url string) (*gitpb.Repo, error) {
fullpath := filepath.Join(f.GetGoSrc(), gopath)
+ test := f.Repos.FindByFullPath(fullpath)
+ if test != nil {
+ return test, nil
+ }
+ log.Info("LEN START", f.Repos.Len())
repo, err := f.Repos.NewGoRepo(fullpath, gopath)
if err != nil {
log.Info("WARNING. NEW FAILED", fullpath)
return nil, err
}
+ log.Info("LEN END", f.Repos.Len())
+ slices.Reverse(f.Repos.Repos)
+ log.Info("LEN END", f.Repos.Len())
+
repo.URL = url
f.VerifyBranchNames(repo)
if f.Config.IsReadOnly(repo.GetGoPath()) {