diff options
| author | Jeff Carr <[email protected]> | 2024-12-17 00:00:27 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-12-17 00:00:27 -0600 |
| commit | 075fce61e541eec6ccdc02c9de3bee14e9e486cf (patch) | |
| tree | a715cc0cc960c3d91d0be96e3006c6e8daf5597e /repoNew.go | |
| parent | a9286af8fd3f912aa357e3ebe67af09f42b8d534 (diff) | |
start cleaning up git interactions
Diffstat (limited to 'repoNew.go')
| -rw-r--r-- | repoNew.go | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -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 } |
