diff --git a/goSrcScan.go b/goSrcScan.go index fd61b47..92917e6 100644 --- a/goSrcScan.go +++ b/goSrcScan.go @@ -160,10 +160,10 @@ func (f *Forge) rillScanDirs(gopaths []string) (int, error) { func (f *Forge) checkpath(gopath string, url string) (*gitpb.Repo, error) { fullpath := filepath.Join(f.GetGoSrc(), gopath) - log.Info("checkpath()", gopath, fullpath) + log.Info("forge creating protobuf for", fullpath) repo, err := f.NewGoRepo(gopath, "") if err != nil { - log.Info("checkpath()", gopath, err) + log.Info("\tprotobuf error", gopath, err) } return repo, err } diff --git a/repoNew.go b/repoNew.go index 1b8173a..de85c89 100644 --- a/repoNew.go +++ b/repoNew.go @@ -5,7 +5,6 @@ import ( "os" "path/filepath" "regexp" - "slices" "strings" "go.wit.com/lib/protobuf/gitpb" @@ -18,15 +17,12 @@ func (f *Forge) NewGoRepo(gopath string, url string) (*gitpb.Repo, error) { 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()) + // slices.Reverse(f.Repos.Repos) repo.URL = url f.VerifyBranchNames(repo) @@ -86,7 +82,7 @@ func (f *Forge) findMasterBranch(repo *gitpb.Repo) { if strings.HasPrefix(s, "ref: ") { fields := strings.Fields(s) _, bname := filepath.Split(fields[1]) - log.Info("Using master branch name from .git/ HEAD:", bname) + // log.Info("Using master branch name from .git/ HEAD:", bname) repo.SetMasterBranchName(bname) return } @@ -105,11 +101,13 @@ func (f *Forge) findMasterBranch(repo *gitpb.Repo) { // TODO: figure out the name from git repo.SetMasterBranchName("master") + /* no longer checkout on Init() if repo.CheckoutMaster() { } else { cmd := []string{"git", "branch", "master"} repo.Run(cmd) } + */ } // figure out what the name of the git devel branch is @@ -118,11 +116,13 @@ func (f *Forge) findDevelBranch(repo *gitpb.Repo) { // check the forge config first if bname := f.Config.FindDevelBranch(repo.GetGoPath()); bname != "" { repo.SetDevelBranchName(bname) + /* no longer checkout on Init() if repo.CheckoutDevel() { } else { cmd := []string{"git", "branch", bname} repo.Run(cmd) } + */ return } @@ -131,13 +131,14 @@ func (f *Forge) findDevelBranch(repo *gitpb.Repo) { return } - // TODO: figure out the name from git repo.SetDevelBranchName("devel") + /* no longer checkout on Init() if repo.CheckoutDevel() { } else { cmd := []string{"git", "branch", "devel"} repo.Run(cmd) } + */ } // this is still in flux @@ -159,11 +160,13 @@ func (f *Forge) VerifyBranchNames(repo *gitpb.Repo) { } else { // forcing for now. todo: warn users repo.SetUserBranchName(uname) + /* no longer checkout on Init() if repo.CheckoutUser() { } else { cmd := []string{"git", "branch", uname} repo.Run(cmd) } + */ } } }