From 075fce61e541eec6ccdc02c9de3bee14e9e486cf Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Tue, 17 Dec 2024 00:00:27 -0600 Subject: start cleaning up git interactions --- repoNew.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'repoNew.go') diff --git a/repoNew.go b/repoNew.go index 772e9b2..69a2338 100644 --- a/repoNew.go +++ b/repoNew.go @@ -3,19 +3,22 @@ package forgepb import ( "fmt" "os/user" + "path/filepath" "strings" "go.wit.com/lib/protobuf/gitpb" "go.wit.com/log" ) -func (f *Forge) NewGoPathRepo(gopath string) (*gitpb.Repo, error) { - repo, err := f.Repos.NewGoPath(f.GetGoSrc(), gopath, "") +func (f *Forge) NewGoRepo(gopath string, url string) (*gitpb.Repo, error) { + fullpath := filepath.Join(f.GetGoSrc(), gopath) + repo, err := f.Repos.NewGoRepo(fullpath, gopath) if err != nil { return nil, err } + repo.URL = url f.VerifyBranchNames(repo) - repo.ParseGoSum() + repo.Reload() return repo, nil } -- cgit v1.2.3