mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-06 21:07:06 +02:00
remove unused scripts and simplify migrate form definition
This commit is contained in:
1 parent
da6fd93f0d
commit
34102f7889
8 files changed
+17
-40
No files matched your search
@@ -196,7 +196,7 @@ func MigrateRepo(ctx *middleware.Context, form auth.MigrateRepoForm) {
|
||||
}
|
||||
}
|
||||
|
||||
// Remote address can be HTTPS URL or local path.
|
||||
// Remote address can be HTTP/HTTPS URL or local path.
|
||||
remoteAddr := form.CloneAddr
|
||||
if strings.HasPrefix(form.CloneAddr, "http") {
|
||||
u, err := url.Parse(form.CloneAddr)
|
||||
@@ -204,8 +204,8 @@ func MigrateRepo(ctx *middleware.Context, form auth.MigrateRepoForm) {
|
||||
ctx.HandleAPI(422, err)
|
||||
return
|
||||
}
|
||||
if len(form.AuthUserName) > 0 || len(form.AuthPasswd) > 0 {
|
||||
u.User = url.UserPassword(form.AuthUserName, form.AuthPasswd)
|
||||
if len(form.AuthUsername) > 0 || len(form.AuthPassword) > 0 {
|
||||
u.User = url.UserPassword(form.AuthUsername, form.AuthPassword)
|
||||
}
|
||||
remoteAddr = u.String()
|
||||
} else if !com.IsDir(remoteAddr) {
|
||||
|
||||
Reference in new issue
Block a user