summaryrefslogtreecommitdiff
path: root/repo.new.go
diff options
context:
space:
mode:
Diffstat (limited to 'repo.new.go')
-rw-r--r--repo.new.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/repo.new.go b/repo.new.go
index cb79bf2..48c588b 100644
--- a/repo.new.go
+++ b/repo.new.go
@@ -4,7 +4,6 @@ import (
"bytes"
"errors"
"fmt"
- "net/url"
"os/exec"
"path/filepath"
"strings"
@@ -124,14 +123,13 @@ func NewRepo(fullpath string) (*Repo, error) {
return &repo, nil
}
// log.Info("GET Namespace from URL", giturl)
- tmpURL, err := url.Parse(giturl)
+ tmpURL, err := ParseGitURL(giturl)
if err != nil {
- log.Info(repo.FullPath, "URL parse failed", giturl, err)
+ log.Info(repo.FullPath, "URL can not be parsed for namespace")
return &repo, nil
}
// log.Info(repo.FullPath, "namespace might be:", tmpURL.Hostname(), tmpURL.Path)
repo.Namespace = filepath.Join(tmpURL.Hostname(), tmpURL.Path)
- // log.Info(repo.FullPath, "Namesapce =", repo.Namespace)
}
return &repo, nil
}