diff options
Diffstat (limited to 'repoNew.go')
| -rw-r--r-- | repoNew.go | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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()) { |
