summaryrefslogtreecommitdiff
path: root/clone.go
diff options
context:
space:
mode:
Diffstat (limited to 'clone.go')
-rw-r--r--clone.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/clone.go b/clone.go
index 0039296..02177f3 100644
--- a/clone.go
+++ b/clone.go
@@ -14,6 +14,11 @@ import (
"go.wit.com/log"
)
+func getClonePathFromMode() string {
+ panic("goclonePathFromMode() nope")
+ return ""
+}
+
// will not violate filesystem namespace
// always returns the path or a parent path
//
@@ -29,7 +34,7 @@ func (f *Forge) GoClone(gopath string) (*gitpb.Repo, error) {
// will match /root/go/src/go.wit.com/apps/go-clone/something/inside
// and return the *gitpb.Repo for "go.wit.com/apps/go-clone"
- fullpath := filepath.Join(f.Config.ReposDir, gopath)
+ fullpath := filepath.Join(getClonePathFromMode(), gopath)
if pb := f.FindAnyPath(fullpath); pb != nil {
// repo already exists
return pb, nil
@@ -156,7 +161,7 @@ func (f *Forge) goClonePop(gopath string) (*gitpb.Repo, error) {
func (f *Forge) urlClone(gopath, giturl string) (*gitpb.Repo, error) {
var err error
- fullpath := filepath.Join(f.Config.ReposDir, gopath)
+ fullpath := filepath.Join(getClonePathFromMode(), gopath)
basedir, newdir := filepath.Split(fullpath)
// clone the URL directly