fixed git issue

This commit is contained in:
marvzhang
2020-07-08 10:25:58 +08:00
parent 6a4947b14b
commit 2abb450574
3 changed files with 6 additions and 4 deletions
+4
View File
@@ -0,0 +1,4 @@
package market
type Repo struct {
}
+1
View File
@@ -0,0 +1 @@
package routes
+1 -4
View File
@@ -139,10 +139,7 @@ func SaveSpiderGitSyncError(s model.Spider, errMsg string) {
// 获得Git分支
func GetGitRemoteBranchesPlain(gitUrl string, username string, password string) (branches []string, err error) {
storage := memory.NewStorage()
u, err := url.Parse(gitUrl)
if err != nil {
return branches, err
}
u, _ := url.Parse(gitUrl)
var listOptions git.ListOptions
if strings.HasPrefix(gitUrl, "http") {
gitUrl = fmt.Sprintf(